]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/goldenmoustache.py
0fb5097244a6218afca0a0908448127f74073b77
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class GoldenMoustacheIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?goldenmoustache\.com/(?P<display_id>[\w-]+)-(?P<id>\d+)'
9 'url': 'http://www.goldenmoustache.com/suricate-le-poker-3700/',
10 'md5': '0f904432fa07da5054d6c8beb5efb51a',
14 'title': 'Suricate - Le Poker',
15 'description': 'md5:3d1f242f44f8c8cb0a106f1fd08e5dc9',
16 'thumbnail': 're:^https?://.*\.jpg$',
19 'url': 'http://www.goldenmoustache.com/le-lab-tout-effacer-mc-fly-et-carlito-55249/',
20 'md5': '27f0c50fb4dd5f01dc9082fc67cd5700',
24 'title': 'Le LAB - Tout Effacer (Mc Fly et Carlito)',
25 'description': 'md5:9b7fbf11023fb2250bd4b185e3de3b2a',
26 'thumbnail': 're:^https?://.*\.(?:png|jpg)$',
30 def _real_extract(self
, url
):
31 video_id
= self
._match
_id
(url
)
32 webpage
= self
._download
_webpage
(url
, video_id
)
34 video_url
= self
._html
_search
_regex
(
35 r
'data-src-type="mp4" data-src="([^"]+)"', webpage
, 'video URL')
36 title
= self
._html
_search
_regex
(
37 r
'<title>(.*?)(?: - Golden Moustache)?</title>', webpage
, 'title')
38 thumbnail
= self
._og
_search
_thumbnail
(webpage
)
39 description
= self
._og
_search
_description
(webpage
)
46 'description': description
,
47 'thumbnail': thumbnail
,