mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add author for item
This commit is contained in:
parent
3a95d21808
commit
dff93f67f9
4 changed files with 14 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue