]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/rmcdecouverte.py
e921ca3e6204a3f4dcd892c3e18b00e6148d4cc8
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from .brightcove
import BrightcoveLegacyIE
12 class RMCDecouverteIE(InfoExtractor
):
13 _VALID_URL
= r
'https?://rmcdecouverte\.bfmtv\.com/mediaplayer-replay.*?\bid=(?P<id>\d+)'
16 'url': 'http://rmcdecouverte.bfmtv.com/mediaplayer-replay/?id=13502&title=AQUAMEN:LES%20ROIS%20DES%20AQUARIUMS%20:UN%20DELICIEUX%20PROJET',
18 'id': '5419055995001',
20 'title': 'UN DELICIEUX PROJET',
21 'description': 'md5:63610df7c8b1fc1698acd4d0d90ba8b5',
22 'uploader_id': '1969646226001',
23 'upload_date': '20170502',
24 'timestamp': 1493745308,
27 'skip_download': True,
29 'skip': 'only available for a week',
31 BRIGHTCOVE_URL_TEMPLATE
= 'http://players.brightcove.net/1969646226001/default_default/index.html?videoId=%s'
33 def _real_extract(self
, url
):
34 video_id
= self
._match
_id
(url
)
35 webpage
= self
._download
_webpage
(url
, video_id
)
36 brightcove_legacy_url
= BrightcoveLegacyIE
._extract
_brightcove
_url
(webpage
)
37 if brightcove_legacy_url
:
38 brightcove_id
= compat_parse_qs(compat_urlparse
.urlparse(
39 brightcove_legacy_url
).query
)['@videoPlayer'][0]
41 brightcove_id
= self
._search
_regex
(
42 r
'data-video-id=["\'](\d
+)', webpage, 'brightcove
id')
43 return self.url_result(
44 self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew
',