3 from .common
import InfoExtractor
4 from ..utils
import remove_start
7 class TeleMBIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?telemb\.be/(?P<display_id>.+?)_d_(?P<id>\d+)\.html'
12 'url': 'http://www.telemb.be/mons-cook-with-danielle-des-cours-de-cuisine-en-anglais-_d_13466.html',
13 'md5': 'f45ea69878516ba039835794e0f8f783',
16 'display_id': 'mons-cook-with-danielle-des-cours-de-cuisine-en-anglais-',
18 'title': 'Mons - Cook with Danielle : des cours de cuisine en anglais ! - Les reportages',
19 'description': 'md5:bc5225f47b17c309761c856ad4776265',
20 'thumbnail': r
're:^http://.*\.(?:jpg|png)$',
24 # non-ASCII characters in download URL
25 'url': 'http://telemb.be/les-reportages-havre-incendie-mortel_d_13514.html',
26 'md5': '6e9682736e5ccd4eab7f21e855350733',
29 'display_id': 'les-reportages-havre-incendie-mortel',
31 'title': 'Havré - Incendie mortel - Les reportages',
32 'description': 'md5:5e54cb449acb029c2b7734e2d946bd4a',
33 'thumbnail': r
're:^http://.*\.(?:jpg|png)$',
38 def _real_extract(self
, url
):
39 mobj
= self
._match
_valid
_url
(url
)
40 video_id
= mobj
.group('id')
41 display_id
= mobj
.group('display_id')
43 webpage
= self
._download
_webpage
(url
, display_id
)
46 for video_url
in re
.findall(r
'file\s*:\s*"([^"]+)"', webpage
):
49 'format_id': video_url
.split(':')[0],
51 rtmp
= re
.search(r
'^(?P<url>rtmp://[^/]+/(?P<app>.+))/(?P<playpath>mp4:.+)$', video_url
)
54 'play_path': rtmp
.group('playpath'),
55 'app': rtmp
.group('app'),
56 'player_url': 'http://p.jwpcdn.com/6/10/jwplayer.flash.swf',
57 'page_url': 'http://www.telemb.be',
62 title
= remove_start(self
._og
_search
_title
(webpage
), 'TéléMB : ')
63 description
= self
._html
_search
_regex
(
64 r
'<meta property="og:description" content="(.+?)" />',
65 webpage
, 'description', fatal
=False)
66 thumbnail
= self
._og
_search
_thumbnail
(webpage
)
70 'display_id': display_id
,
72 'description': description
,
73 'thumbnail': thumbnail
,