]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/criterion.py
cf6a5d6cbe906443b1db592616cd89926860bbdd
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class CriterionIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?criterion\.com/films/(?P<id>[0-9]+)-.+'
10 'url': 'http://www.criterion.com/films/184-le-samourai',
11 'md5': 'bc51beba55685509883a9a7830919ec3',
15 'title': 'Le Samouraï',
16 'description': 'md5:a2b4b116326558149bef81f76dcbb93f',
17 'thumbnail': 're:^https?://.*\.jpg$',
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
23 webpage
= self
._download
_webpage
(url
, video_id
)
25 final_url
= self
._search
_regex
(
26 r
'so\.addVariable\("videoURL", "(.+?)"\)\;', webpage
, 'video url')
27 title
= self
._og
_search
_title
(webpage
)
28 description
= self
._html
_search
_meta
('description', webpage
)
29 thumbnail
= self
._search
_regex
(
30 r
'so\.addVariable\("thumbnailURL", "(.+?)"\)\;',
31 webpage
, 'thumbnail url')
37 'description': description
,
38 'thumbnail': thumbnail
,