]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/lemonde.py
42568f315ed1b6818907f1236705ebdeed2c02cb
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class LemondeIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:.+?\.)?lemonde\.fr/(?:[^/]+/)*(?P<id>[^/]+)\.html'
9 'url': 'http://www.lemonde.fr/police-justice/video/2016/01/19/comprendre-l-affaire-bygmalion-en-cinq-minutes_4849702_1653578.html',
10 'md5': '01fb3c92de4c12c573343d63e163d302',
14 'title': "Comprendre l'affaire Bygmalion en 5 minutes",
15 'thumbnail': r
're:^https?://.*\.jpg',
17 'upload_date': '20160119',
18 'timestamp': 1453194778,
19 'uploader_id': '3pmkp',
22 'url': 'http://redaction.actu.lemonde.fr/societe/video/2016/01/18/calais-debut-des-travaux-de-defrichement-dans-la-jungle_4849233_3224.html',
23 'only_matching': True,
26 def _real_extract(self
, url
):
27 display_id
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(url
, display_id
)
31 digiteka_url
= self
._proto
_relative
_url
(self
._search
_regex
(
32 r
'url\s*:\s*(["\'])(?P
<url
>(?
:https?
://)?
//(?
:www\
.)?
(?
:digiteka\
.net|ultimedia\
.com
)/deliver
/.+?
)\
1',
33 webpage, 'digiteka url
', group='url
'))
34 return self.url_result(digiteka_url, 'Digiteka
')