]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/gamekings.py
027f55eb2b7338dd2459c8128d587c0ac858434e
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
11 class GamekingsIE(InfoExtractor
):
12 _VALID_URL
= r
'http://www\.gamekings\.tv/(?:videos|nieuws)/(?P<id>[^/]+)'
14 'url': 'http://www.gamekings.tv/videos/phoenix-wright-ace-attorney-dual-destinies-review/',
15 # MD5 is flaky, seems to change regularly
16 # 'md5': '2f32b1f7b80fdc5cb616efb4f387f8a3',
18 'id': 'phoenix-wright-ace-attorney-dual-destinies-review',
20 'title': 'Phoenix Wright: Ace Attorney \u2013 Dual Destinies Review',
21 'description': 'md5:36fd701e57e8c15ac8682a2374c99731',
22 'thumbnail': 're:^https?://.*\.jpg$',
26 'url': 'http://www.gamekings.tv/videos/the-legend-of-zelda-majoras-mask/',
27 'md5': '12bf04dfd238e70058046937657ea68d',
29 'id': 'the-legend-of-zelda-majoras-mask',
31 'title': 'The Legend of Zelda: Majora’s Mask',
32 'description': 'md5:9917825fe0e9f4057601fe1e38860de3',
33 'thumbnail': 're:^https?://.*\.jpg$',
36 'url': 'http://www.gamekings.tv/nieuws/gamekings-extra-shelly-en-david-bereiden-zich-voor-op-de-livestream/',
37 'only_matching': True,
40 def _real_extract(self
, url
):
41 video_id
= self
._match
_id
(url
)
43 webpage
= self
._download
_webpage
(url
, video_id
)
45 playlist_id
= self
._search
_regex
(
46 r
'gogoVideo\(\s*\d+\s*,\s*"([^"]+)', webpage
, 'playlist id')
48 playlist
= self
._download
_xml
(
49 'http://www.gamekings.tv/wp-content/themes/gk2010/rss_playlist.php?id=%s' % playlist_id
,
53 'jwplayer': 'http://rss.jwpcdn.com/'
56 item
= playlist
.find('./channel/item')
58 thumbnail
= xpath_text(item
, xpath_with_ns('./jwplayer:image', NS_MAP
), 'thumbnail')
59 video_url
= item
.find(xpath_with_ns('./jwplayer:source', NS_MAP
)).get('file')
64 'title': self
._og
_search
_title
(webpage
),
65 'description': self
._og
_search
_description
(webpage
),
66 'thumbnail': thumbnail
,