]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fktv.py
2958452f470bca7f7322fa9dcdccca66f525cee0
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
11 class FKTVIE(InfoExtractor
):
12 IE_NAME
= 'fernsehkritik.tv'
13 _VALID_URL
= r
'https?://(?:www\.)?fernsehkritik\.tv/folge-(?P<id>[0-9]+)(?:/.*)?'
16 'url': 'http://fernsehkritik.tv/folge-1',
17 'md5': '21f0b0c99bce7d5b524eb1b17b1c6d79',
21 'title': 'Folge 1 vom 10. April 2007',
22 'thumbnail': r
're:^https?://.*\.jpg$',
26 def _real_extract(self
, url
):
27 episode
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(
30 'http://fernsehkritik.tv/folge-%s/play' % episode
, episode
)
31 title
= clean_html(self
._html
_search
_regex
(
32 '<h3>([^<]+)</h3>', webpage
, 'title'))
33 thumbnail
= self
._search
_regex
(r
'POSTER\s*=\s*"([^"]+)', webpage
, 'thumbnail', fatal
=False)
34 sources
= self
._parse
_json
(self
._search
_regex
(r
'(?s)MEDIA\s*=\s*(\[.+?\]);', webpage
, 'media'), episode
, js_to_json
)
37 for source
in sources
:
38 furl
= source
.get('src')
42 'format_id': determine_ext(furl
),
44 self
._sort
_formats
(formats
)
50 'thumbnail': thumbnail
,