]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/gamekings.py
3 from .common
import InfoExtractor
6 class GamekingsIE(InfoExtractor
):
7 _VALID_URL
= r
'http?://www\.gamekings\.tv/videos/(?P<name>[0-9a-z\-]+)'
9 u
"url": u
"http://www.gamekings.tv/videos/phoenix-wright-ace-attorney-dual-destinies-review/",
10 u
'file': u
'20130811.mp4',
11 # MD5 is flaky, seems to change regularly
12 #u'md5': u'2f32b1f7b80fdc5cb616efb4f387f8a3',
14 u
"title": u
"Phoenix Wright: Ace Attorney \u2013 Dual Destinies Review",
15 u
"description": u
"Melle en Steven hebben voor de review een week in de rechtbank doorbracht met Phoenix Wright: Ace Attorney - Dual Destinies.",
19 def _real_extract(self
, url
):
21 mobj
= re
.match(self
._VALID
_URL
, url
)
22 name
= mobj
.group('name')
23 webpage
= self
._download
_webpage
(url
, name
)
24 video_url
= self
._og
_search
_video
_url
(webpage
)
26 video
= re
.search(r
'[0-9]+', video_url
)
27 video_id
= video
.group(0)
29 # Todo: add medium format
30 video_url
= video_url
.replace(video_id
, 'large/' + video_id
)
36 'title': self
._og
_search
_title
(webpage
),
37 'description': self
._og
_search
_description
(webpage
),