2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 class OktoberfestTVIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?oktoberfest-tv\.de/[^/]+/[^/]+/video/(?P<id>[^/?#]+)'
11 'url': 'http://www.oktoberfest-tv.de/de/kameras/video/hb-zelt',
15 'title': 're:^Live-Kamera: Hofbräuzelt [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
16 'thumbnail': 're:^https?://.*\.jpg$',
20 'skip_download': True,
24 def _real_extract(self, url):
25 video_id = self._match_id(url)
26 webpage = self._download_webpage(url, video_id)
28 title = self._live_title(self._html_search_regex(
29 r'<h1><strong>.*?</strong>(.*?)</h1>', webpage, 'title'))
31 clip = self._search_regex(
32 r"clip:\s*\{\s*url:\s*'([^']+)'", webpage, 'clip')
33 ncurl = self._search_regex(
34 r"netConnectionUrl:\s*'([^']+)'", webpage, 'rtmp base')
35 video_url = ncurl + clip
36 thumbnail = self._search_regex(
37 r"canvas:\s*\{\s*backgroundImage:\s*'url\(([^)]+)\)'", webpage,
38 'thumbnail', fatal=False)
46 'thumbnail': thumbnail,