mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-23 01:45:41 +00:00
Fix crash in video crawler
This commit is contained in:
@@ -307,9 +307,8 @@ def get_video(id, client, db, refresh = true)
|
||||
return video
|
||||
end
|
||||
|
||||
def search(query, client)
|
||||
html = client.get("https://www.youtube.com/results?q=#{query}&sp=EgIQAVAU&disable_polymer=1").body
|
||||
|
||||
def search(query, client, &block)
|
||||
html = client.get("/results?q=#{query}&sp=EgIQAVAU&disable_polymer=1").body
|
||||
html = XML.parse_html(html)
|
||||
|
||||
html.xpath_nodes(%q(//ol[@class="item-section"]/li)).each do |item|
|
||||
|
||||
Reference in New Issue
Block a user