]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/gamekings.py
cf8e90d7dbe9483efffe7894bedbe437746c5da1
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class GamekingsIE(InfoExtractor
):
9 _VALID_URL
= r
'http://www\.gamekings\.tv/videos/(?P<name>[0-9a-z\-]+)'
11 'url': 'http://www.gamekings.tv/videos/phoenix-wright-ace-attorney-dual-destinies-review/',
12 # MD5 is flaky, seems to change regularly
13 # 'md5': '2f32b1f7b80fdc5cb616efb4f387f8a3',
17 'title': 'Phoenix Wright: Ace Attorney \u2013 Dual Destinies Review',
18 'description': 'md5:36fd701e57e8c15ac8682a2374c99731',
22 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
25 name
= mobj
.group('name')
26 webpage
= self
._download
_webpage
(url
, name
)
27 video_url
= self
._og
_search
_video
_url
(webpage
)
29 video
= re
.search(r
'[0-9]+', video_url
)
30 video_id
= video
.group(0)
32 # Todo: add medium format
33 video_url
= video_url
.replace(video_id
, 'large/' + video_id
)
39 'title': self
._og
_search
_title
(webpage
),
40 'description': self
._og
_search
_description
(webpage
),