]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/rudo.py
2 from __future__
import unicode_literals
6 from .jwplatform
import JWPlatformBaseIE
14 class RudoIE(JWPlatformBaseIE
):
15 _VALID_URL
= r
'https?://rudo\.video/vod/(?P<id>[0-9a-zA-Z]+)'
18 'url': 'http://rudo.video/vod/oTzw0MGnyG',
19 'md5': '2a03a5b32dd90a04c83b6d391cf7b415',
23 'title': 'Comentario Tomás Mosciatti',
24 'upload_date': '20160617',
29 def _extract_url(self
, webpage
):
31 '<iframe[^>]+src=(?P<q1>[\'"])(?P<url>(?:https?:)?//rudo\.video/vod/[0-9a-zA-Z]+)(?P=q1)',
34 return mobj
.group('url')
36 def _real_extract(self
, url
):
37 video_id
= self
._match
_id
(url
)
39 webpage
= self
._download
_webpage
(url
, video_id
, encoding
='iso-8859-1')
41 jwplayer_data
= self
._parse
_json
(self
._search
_regex
(
42 r
'(?s)playerInstance\.setup\(({.+?})\)', webpage
, 'jwplayer data'), video_id
,
43 transform_source
=lambda s
: js_to_json(re
.sub(r
'encodeURI\([^)]+\)', '""', s
)))
45 info_dict
= self
._parse
_jwplayer
_data
(
46 jwplayer_data
, video_id
, require_title
=False, m3u8_id
='hls')
49 'title': self
._og
_search
_title
(webpage
),
50 'upload_date': unified_strdate(get_element_by_class('date', webpage
)),