]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/rudo.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
14 class RudoIE(InfoExtractor
):
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 r
'<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', mpd_id='dash')
49 'title': self._og_search_title(webpage),
50 'upload_date': unified_strdate(get_element_by_class('date', webpage)),