2 from __future__ import unicode_literals
7 from .common import InfoExtractor
10 class TeleBruxellesIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?telebruxelles\.be/(news|sport|dernier-jt)/?(?P<title>[^\?]+)'
13 'url': r'http://www.telebruxelles.be/news/auditions-devant-parlement-francken-galant-tres-attendus/',
14 'md5': '59439e568c9ee42fb77588b2096b214f',
18 'title': 're:Parlement : Francken et Galant répondent aux interpellations*',
19 'description': 're:Les auditions des ministres se poursuivent*'
22 'url': r'http://www.telebruxelles.be/sport/basket-brussels-bat-mons-80-74/',
23 'md5': '181d3fbdcf20b909309e5aef5c6c6047',
27 'title': 'Basket : le Brussels bat Mons 80-74',
28 'description': 're:Ils l\u2019on fait ! En basket, le B*'
32 def _real_extract(self, url):
33 mobj = re.match(self._VALID_URL, url)
34 title = mobj.group('title')
36 webpage = self._download_webpage(url, title)
38 article_id = self._html_search_regex(r"<article id=\"post-(\d+)\"", webpage, '0')
39 title = self._html_search_regex(r'<h1 class=\"entry-title\">(.*?)</h1>', webpage, 'title')
40 description = self._html_search_regex(r"property=\"og:description\" content=\"(.*?)\"", webpage, 'description', fatal=False)
42 rtmp_url = self._html_search_regex(r"file: \"(rtmp://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d{1,5}/vod/mp4:\" \+ \"\w+\" \+ \".mp4)\"", webpage, 'url')
43 rtmp_url = rtmp_url.replace("\" + \"", "")
48 'description': description,
51 'rtmp_live': True # if rtmpdump is not called with "--live" argument, the download is blocked and can be completed