]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/telebruxelles.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class TeleBruxellesIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?(?:telebruxelles|bx1)\.be/(news|sport|dernier-jt)/?(?P<id>[^/#?]+)'
12 'url': 'http://www.telebruxelles.be/news/auditions-devant-parlement-francken-galant-tres-attendus/',
13 'md5': '59439e568c9ee42fb77588b2096b214f',
16 'display_id': 'auditions-devant-parlement-francken-galant-tres-attendus',
18 'title': 'Parlement : Francken et Galant répondent aux interpellations de l’opposition',
19 'description': 're:Les auditions des ministres se poursuivent*'
22 'skip_download': 'requires rtmpdump'
25 'url': 'http://www.telebruxelles.be/sport/basket-brussels-bat-mons-80-74/',
26 'md5': '181d3fbdcf20b909309e5aef5c6c6047',
29 'display_id': 'basket-brussels-bat-mons-80-74',
31 'title': 'Basket : le Brussels bat Mons 80-74',
32 'description': 're:^Ils l\u2019on fait ! En basket, le B*',
35 'skip_download': 'requires rtmpdump'
39 def _real_extract(self
, url
):
40 display_id
= self
._match
_id
(url
)
41 webpage
= self
._download
_webpage
(url
, display_id
)
43 article_id
= self
._html
_search
_regex
(
44 r
"<article id=\"post
-(\d
+)\"", webpage, 'article ID', default=None)
45 title = self._html_search_regex(
46 r'<h1 class=\"entry-title\">(.*?)</h1>', webpage, 'title')
47 description = self._og_search_description(webpage, default=None)
49 rtmp_url = self._html_search_regex(
50 r'file\s*:\s*"(rtmp
://[^
/]+/vod
/mp4
:"\s*\+\s*"[^
"]+"\s
*\
+\s
*".mp4)"',
52 rtmp_url = re.sub(r'"\s*\+\s*"', '', rtmp_url)
55 'id': article_id or display_id,
56 'display_id
': display_id,
58 'description
': description,
61 'rtmp_live
': True # if rtmpdump is not called with "--live" argument, the download is blocked and can be completed