2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 class TeleBruxellesIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?telebruxelles\.be/(news|sport|dernier-jt)/?(?P<id>[^/#?]+)'
10 'url': 'http://www.telebruxelles.be/news/auditions-devant-parlement-francken-galant-tres-attendus/',
11 'md5': '59439e568c9ee42fb77588b2096b214f',
14 'display_id': 'auditions-devant-parlement-francken-galant-tres-attendus',
16 'title': 'Parlement : Francken et Galant répondent aux interpellations de l’opposition',
17 'description': 're:Les auditions des ministres se poursuivent*'
20 'skip_download': 'requires rtmpdump'
23 'url': 'http://www.telebruxelles.be/sport/basket-brussels-bat-mons-80-74/',
24 'md5': '181d3fbdcf20b909309e5aef5c6c6047',
27 'display_id': 'basket-brussels-bat-mons-80-74',
29 'title': 'Basket : le Brussels bat Mons 80-74',
30 'description': 're:^Ils l\u2019on fait ! En basket, le B*',
33 'skip_download': 'requires rtmpdump'
37 def _real_extract(self, url):
38 display_id = self._match_id(url)
39 webpage = self._download_webpage(url, display_id)
41 article_id = self._html_search_regex(
42 r"<article id=\"post-(\d+)\"", webpage, 'article ID')
43 title = self._html_search_regex(
44 r'<h1 class=\"entry-title\">(.*?)</h1>', webpage, 'title')
45 description = self._og_search_description(webpage)
47 rtmp_url = self._html_search_regex(
48 r"file: \"(rtmp://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d{1,5}/vod/mp4:\" \+ \"\w+\" \+ \".mp4)\"",
50 rtmp_url = rtmp_url.replace("\" + \"", "")
54 'display_id': display_id,
56 'description': description,
59 'rtmp_live': True # if rtmpdump is not called with "--live" argument, the download is blocked and can be completed