1 from .common
import InfoExtractor
8 class ClubicIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?clubic\.com/video/(?:[^/]+/)*video.*-(?P<id>[0-9]+)\.html'
13 'url': 'http://www.clubic.com/video/clubic-week/video-clubic-week-2-0-le-fbi-se-lance-dans-la-photo-d-identite-448474.html',
14 'md5': '1592b694ba586036efac1776b0b43cd3',
18 'title': 'Clubic Week 2.0 : le FBI se lance dans la photo d\u0092identité',
19 'description': 're:Gueule de bois chez Nokia. Le constructeur a indiqué cette.*',
20 'thumbnail': r
're:^http://img\.clubic\.com/.*\.jpg$',
23 'url': 'http://www.clubic.com/video/video-clubic-week-2-0-apple-iphone-6s-et-plus-mais-surtout-le-pencil-469792.html',
24 'only_matching': True,
27 def _real_extract(self
, url
):
28 video_id
= self
._match
_id
(url
)
30 player_url
= 'http://player.m6web.fr/v1/player/clubic/%s.html' % video_id
31 player_page
= self
._download
_webpage
(player_url
, video_id
)
33 config
= self
._parse
_json
(self
._search
_regex
(
34 r
'(?m)M6\.Player\.config\s*=\s*(\{.+?\});$', player_page
,
35 'configuration'), video_id
)
37 video_info
= config
['videoInfo']
38 sources
= config
['sources']
39 quality_order
= qualities(['sd', 'hq'])
42 'format_id': src
['streamQuality'],
44 'quality': quality_order(src
['streamQuality']),
49 'title': video_info
['title'],
51 'description': clean_html(video_info
.get('description')),
52 'thumbnail': config
.get('poster'),