]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/karaoketv.py
e3b43ff8dbfec5e065aa069a0fb140dcfb5822c9
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..compat
import compat_urllib_parse
11 class KaraoketvIE(InfoExtractor
):
12 _VALID_URL
= r
'http://karaoketv\.co\.il/\?container=songs&id=(?P<id>[0-9]+)'
14 'url': 'http://karaoketv.co.il/?container=songs&id=171568',
18 'title': 'אל העולם שלך - רותם כהן - שרים קריוקי',
22 def _real_extract(self
, url
):
23 video_id
= self
._match
_id
(url
)
24 webpage
= self
._download
_webpage
(url
, video_id
)
26 page_video_url
= self
._og
_search
_video
_url
(webpage
, video_id
)
27 config_json
= compat_urllib_parse
.unquote_plus(self
._search
_regex
(
28 r
'config=(.*)', page_video_url
, 'configuration'))
30 urls_info_json
= self
._download
_json
(
31 config_json
, video_id
, 'Downloading configuration',
32 transform_source
=js_to_json
)
34 url
= urls_info_json
['playlist'][0]['url']
38 'title': self
._og
_search
_title
(webpage
),