Invidious is an alternative front-end to YouTube
Fix searches where items don't have byline
Omar Roth7d6bc671c269
diff --git a/src/invidious/search.cr b/src/invidious/search.crindex 6b6d3f57..1b1afbfb 100644--- a/src/invidious/search.cr+++ b/src/invidious/search.cr@@ -35,7 +35,10 @@ def search(query, page = 1, search_params = build_search_params(content_type: "vtitle = anchor.content.stripvideo_id = anchor["href"].lchop("/watch?v=")- anchor = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a)).not_nil!+ anchor = node.xpath_node(%q(.//div[contains(@class, "yt-lockup-byline")]/a))+ if !anchor+ next+ endauthor = anchor.contentauthor_url = anchor["href"]ucid = author_url.split("/")[-1]