From ba322d82090bd1126774e772b699283121ffa4b8 Mon Sep 17 00:00:00 2001 From: robin Date: Sun, 8 Feb 2015 14:23:37 +0100 Subject: [PATCH] [Gamekings] Added test and replaced video_url Quick and dirty fix for the Gamekings extractor. It gives an error about the video_url, but it downloads it now instead of giving a 404 error on newer Gamekings videos --- youtube_dl/extractor/gamekings.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/gamekings.py b/youtube_dl/extractor/gamekings.py index a5d854ade..aa589390a 100644 --- a/youtube_dl/extractor/gamekings.py +++ b/youtube_dl/extractor/gamekings.py @@ -7,7 +7,8 @@ class GamekingsIE(InfoExtractor): _VALID_URL = r'http://www\.gamekings\.tv/videos/(?P[0-9a-z\-]+)' - _TEST = { + _TESTS = [ + { 'url': 'http://www.gamekings.tv/videos/phoenix-wright-ace-attorney-dual-destinies-review/', # MD5 is flaky, seems to change regularly # 'md5': '2f32b1f7b80fdc5cb616efb4f387f8a3', @@ -16,8 +17,17 @@ class GamekingsIE(InfoExtractor): 'ext': 'mp4', 'title': 'Phoenix Wright: Ace Attorney \u2013 Dual Destinies Review', 'description': 'md5:36fd701e57e8c15ac8682a2374c99731', + } + }, + { + 'url': 'http://www.gamekings.tv/videos/the-legend-of-zelda-majoras-mask/', + 'info_dict': { + 'id': '118933752', + 'ext': 'mp4', + 'title': 'The Legend of Zelda: Majora’s Mask' + } } - } + ] def _real_extract(self, url): @@ -33,6 +43,7 @@ def _real_extract(self, url): 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('large/' + video_id, video_id) + video_url = video_url.replace('http://stream.gamekings.tv/', '') return { 'id': video_id,