[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
This commit is contained in:
robin 2015-02-08 14:23:37 +01:00
parent 2f38289b79
commit ba322d8209
1 changed files with 13 additions and 2 deletions

View File

@ -7,7 +7,8 @@ from .common import InfoExtractor
class GamekingsIE(InfoExtractor):
_VALID_URL = r'http://www\.gamekings\.tv/videos/(?P<name>[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: Majoras Mask'
}
}
}
]
def _real_extract(self, url):
@ -33,6 +43,7 @@ class GamekingsIE(InfoExtractor):
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,