mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-16 09:58:50 +00:00
Add author for item
This commit is contained in:
@@ -273,6 +273,15 @@ get "/search" do |env|
|
||||
end
|
||||
end
|
||||
|
||||
author = root.xpath_node(%q(div[@class="yt-lockup-content"]/div/a))
|
||||
if author
|
||||
video["author"] = author.content
|
||||
video["author_url"] = author["href"]
|
||||
else
|
||||
video["author"] = ""
|
||||
video["author_url"] = ""
|
||||
end
|
||||
|
||||
videos << video
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user