]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/oktoberfesttv.py
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': r
'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
,