]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/fktv.py
40ea2789525ab720beb9e6e42a096682a9581027
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
13 class FKTVIE(InfoExtractor
):
14 IE_NAME
= 'fernsehkritik.tv'
15 _VALID_URL
= r
'http://(?:www\.)?fernsehkritik\.tv/folge-(?P<id>[0-9]+)(?:/.*)?'
18 'url': 'http://fernsehkritik.tv/folge-1',
19 'md5': '21f0b0c99bce7d5b524eb1b17b1c6d79',
23 'title': 'Folge 1 vom 10. April 2007',
24 'thumbnail': 're:^https?://.*\.jpg$',
28 def _real_extract(self
, url
):
29 episode
= self
._match
_id
(url
)
31 webpage
= self
._download
_webpage
(
32 'http://fernsehkritik.tv/folge-%s/play' % episode
, episode
)
33 title
= clean_html(self
._html
_search
_regex
(
34 '<h3>([^<]+)</h3>', webpage
, 'title'))
36 r
'(?s)<video(?:(?!poster)[^>])+(?:poster="([^"]+)")?[^>]*>(.*)</video>',
39 raise ExtractorError('Unable to extract the video')
41 poster
, sources
= matches
.groups()
43 self
.report_warning('unable to extract thumbnail')
45 urls
= re
.findall(r
'<source[^>]+src="([^"]+)"', sources
)
48 'format_id': determine_ext(furl
),