]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/movieclips.py
f7f2921fdbac68f773cbc5b823233319d4d44317
1 from .common
import InfoExtractor
10 class MovieClipsIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://(?:www\.)?movieclips\.com/videos/.+-(?P<id>\d+)(?:\?|$)'
13 'url': 'http://www.movieclips.com/videos/warcraft-trailer-1-561180739597',
14 'md5': '42b5a0352d4933a7bd54f2104f481244',
18 'title': 'Warcraft Trailer 1',
19 'description': 'Watch Trailer 1 from Warcraft (2016). Legendary’s WARCRAFT is a 3D epic adventure of world-colliding conflict based.',
20 'thumbnail': r
're:^https?://.*\.jpg$',
21 'timestamp': 1446843055,
22 'upload_date': '20151106',
23 'uploader': 'Movieclips',
25 'add_ie': ['ThePlatform'],
26 'skip': 'redirects to YouTube',
29 def _real_extract(self
, url
):
30 video_id
= self
._match
_id
(url
)
31 webpage
= self
._download
_webpage
(url
, video_id
)
32 video
= next(v
for v
in self
._parse
_json
(self
._search
_regex
(
33 r
'var\s+__REACT_ENGINE__\s*=\s*({.+});',
34 webpage
, 'react engine'), video_id
)['playlist']['videos'] if v
['id'] == video_id
)
37 '_type': 'url_transparent',
38 'ie_key': 'ThePlatform',
39 'url': smuggle_url(update_url_query(
40 video
['contentUrl'], {'mbr': 'true'}
), {'force_smil_url': True}
),
41 'title': self
._og
_search
_title
(webpage
),
42 'description': self
._html
_search
_meta
('description', webpage
),
43 'duration': float_or_none(video
.get('duration')),
44 'timestamp': parse_iso8601(video
.get('dateCreated')),
45 'thumbnail': video
.get('defaultImage'),
46 'uploader': video
.get('provider'),