]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[Gamekings] Fix 404 when large isn't available
authorrobin <rderooij685@gmail.com>
Sun, 8 Feb 2015 12:42:41 +0000 (13:42 +0100)
committerrobin <rderooij685@gmail.com>
Sun, 8 Feb 2015 12:42:41 +0000 (13:42 +0100)
When trying to download some GameKings videos, not all worked. This was
because not all videos had a "/large"-URL available. The extractor
checks now if the /large URL is available, if it isn't, it tries to get
the normal URL.

youtube_dl/extractor/gamekings.py

index cf8e90d7dbe9483efffe7894bedbe437746c5da1..bac325bd80de394044944fd040b7b8a51a67a972 100644 (file)
@@ -31,6 +31,8 @@ class GamekingsIE(InfoExtractor):
 
         # Todo: add medium format
         video_url = video_url.replace(video_id, 'large/' + video_id)
+        if not (self._is_valid_url(video_url, video_id)):
+            video_url = video_url.replace(video_id + '/large', video_id)
 
         return {
             'id': video_id,