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',
27 def _real_extract(self, url):
28 episode = self._match_id(url)
30 webpage = self._download_webpage('http://fernsehkritik.tv/folge-%s/play' % episode, episode)
31 title = clean_html(self._html_search_regex('<h3>([^<]+)</h3>', webpage, 'title'))
32 matches = re.search(r'(?s)<video[^>]+poster="([^"]+)"[^>]*>(.*)</video>', webpage)
34 raise ExtractorError('Unable to extract the video')
36 poster, sources = matches.groups()
37 urls = re.findall(r'<source[^>]+src="([^"]+)"', sources)
38 formats = [{'url': url, 'format_id': determine_ext(url)} for url in urls]