mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-10 17:17:51 +01:00
Add scheme to author thumbnail
This commit is contained in:
parent
ab7e1b42bd
commit
1fd7ff5655
1 changed files with 6 additions and 0 deletions
|
@ -200,6 +200,12 @@ def extract_items(nodeset, ucid = nil, author_name = nil)
|
||||||
|
|
||||||
author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
author_thumbnail = node.xpath_node(%q(.//div/span/img)).try &.["data-thumb"]?
|
||||||
author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
author_thumbnail ||= node.xpath_node(%q(.//div/span/img)).try &.["src"]
|
||||||
|
if author_thumbnail
|
||||||
|
author_thumbnail = URI.parse(author_thumbnail)
|
||||||
|
author_thumbnail.scheme = "https"
|
||||||
|
author_thumbnail = author_thumbnail.to_s
|
||||||
|
end
|
||||||
|
|
||||||
author_thumbnail ||= ""
|
author_thumbnail ||= ""
|
||||||
|
|
||||||
subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i?
|
subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i?
|
||||||
|
|
Loading…
Reference in a new issue