summary refs log tree commit diff
diff options
context:
space:
mode:
authorrobin <rderooij685@gmail.com>2015-02-08 13:42:41 +0100
committerrobin <rderooij685@gmail.com>2015-02-08 13:42:41 +0100
commit77d2b106ccf81e50cf41a7aa0bb320433a84e110 (patch)
tree8da9c386eb6f2b1f99cd9f73f6122e6affda4b83
parent67ce4f8820f94961c9b094f9c652f421c9d9f6fb (diff)
downloadyoutube-dl-77d2b106ccf81e50cf41a7aa0bb320433a84e110.tar.gz
youtube-dl-77d2b106ccf81e50cf41a7aa0bb320433a84e110.tar.xz
youtube-dl-77d2b106ccf81e50cf41a7aa0bb320433a84e110.zip
[Gamekings] Fix 404 when large isn't available
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.
-rw-r--r--youtube_dl/extractor/gamekings.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/gamekings.py b/youtube_dl/extractor/gamekings.py
index cf8e90d7d..bac325bd8 100644
--- a/youtube_dl/extractor/gamekings.py
+++ b/youtube_dl/extractor/gamekings.py
@@ -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,