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,