diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-04-02 08:51:28 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-04-02 08:51:28 -0500 |
| commit | 1fd7ff5655191385d68f3c65191ed70c0b2e6f0b (patch) | |
| tree | e72cc414fadcb3780c7ebf217f3165a20595cd40 | |
| parent | ab7e1b42bdd9750bb3f8f25d164a176f89127971 (diff) | |
| download | invidious-1fd7ff5655191385d68f3c65191ed70c0b2e6f0b.tar.gz invidious-1fd7ff5655191385d68f3c65191ed70c0b2e6f0b.tar.bz2 invidious-1fd7ff5655191385d68f3c65191ed70c0b2e6f0b.zip | |
Add scheme to author thumbnail
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index ad744c74..33d7b6f4 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -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 &.["src"] + if author_thumbnail + author_thumbnail = URI.parse(author_thumbnail) + author_thumbnail.scheme = "https" + author_thumbnail = author_thumbnail.to_s + end + author_thumbnail ||= "" subscriber_count = node.xpath_node(%q(.//span[contains(@class, "yt-subscriber-count")])).try &.["title"].delete(",").to_i? |
