diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-14 08:02:55 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-14 08:02:55 -0500 |
| commit | a4134d30fa4c94b5ce7615229ed7aec4ce4f4993 (patch) | |
| tree | e90a3d581bdc6d98a62caf5138a99c84f7ee1be3 /src | |
| parent | 6069fd02d3c653b9ff725b4e1da1dc57d065838a (diff) | |
| download | invidious-a4134d30fa4c94b5ce7615229ed7aec4ce4f4993.tar.gz invidious-a4134d30fa4c94b5ce7615229ed7aec4ce4f4993.tar.bz2 invidious-a4134d30fa4c94b5ce7615229ed7aec4ce4f4993.zip | |
Fix comedy genre URL
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/videos.cr | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index b60fd4ed..46a028c9 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -1174,8 +1174,10 @@ def fetch_video(id, proxies, region) genre_url = html.xpath_node(%(//ul[contains(@class, "watch-info-tag-list")]/li/a[text()="#{genre}"])).try &.["href"] - # Sometimes YouTube tries to link to invalid/missing channels, so we fix that here + # YouTube provides invalid URLs for some genres, so we fix that here case genre + when "Comedy" + genre_url = "/channel/UCQZ43c4dAA9eXCQuXWu9aTw" when "Education" genre_url = "/channel/UCdxpofrI-dO6oYfsqHDHphw" when "Gaming" |
