]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/rtvs.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class RTVSIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?rtvs\.sk/(?:radio|televizia)/archiv/\d+/(?P<id>\d+)'
11 'url': 'http://www.rtvs.sk/radio/archiv/11224/414872',
12 'md5': '134d5d6debdeddf8a5d761cbc9edacb8',
16 'title': 'Ostrov pokladov 1 časť.mp3'
19 'skip_download': True,
23 'url': 'http://www.rtvs.sk/televizia/archiv/8249/63118',
24 'md5': '85e2c55cf988403b70cac24f5c086dc6',
28 'title': 'Amaro Džives - Náš deň',
29 'description': 'Galavečer pri príležitosti Medzinárodného dňa Rómov.'
32 'skip_download': True,
36 def _real_extract(self
, url
):
37 video_id
= self
._match
_id
(url
)
39 webpage
= self
._download
_webpage
(url
, video_id
)
41 playlist_url
= self
._search
_regex
(
42 r
'playlist["\']?\s
*:\s
*(["\'])(?P<url>(?:(?!\1).)+)\1', webpage,
43 'playlist url', group='url')
45 data = self._download_json(
46 playlist_url, video_id, 'Downloading playlist')[0]
47 return self._parse_jwplayer_data(data, video_id=video_id)