]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/moviepilot.py
1 from .dailymotion
import DailymotionIE
2 from .common
import InfoExtractor
11 class MoviepilotIE(InfoExtractor
):
12 _IE_NAME
= 'moviepilot'
13 _IE_DESC
= 'Moviepilot trailer'
14 _VALID_URL
= r
'https?://(?:www\.)?moviepilot\.de/movies/(?P<id>[^/]+)'
17 'url': 'https://www.moviepilot.de/movies/interstellar-2/',
20 'display_id': 'interstellar-2',
22 'title': 'Interstellar',
23 'thumbnail': r
're:https://\w+\.dmcdn\.net/v/SaXev1VvzitVZMFsR/x720',
24 'timestamp': 1400491705,
25 'description': 'md5:7dfc5c1758e7322a7346934f1f0c489c',
26 'uploader': 'Moviepilot',
29 'uploader_id': 'x6nd9k',
30 'upload_date': '20140519',
33 'tags': ['Alle Trailer', 'Movie', 'Third Party'],
36 'url': 'https://www.moviepilot.de/movies/interstellar-2/trailer',
37 'only_matching': True,
39 'url': 'https://www.moviepilot.de/movies/interstellar-2/kinoprogramm/berlin',
40 'only_matching': True,
42 'url': 'https://www.moviepilot.de/movies/queen-slim/trailer',
45 'display_id': 'queen-slim',
46 'title': 'Queen & Slim',
48 'thumbnail': r
're:https://\w+\.dmcdn\.net/v/SbUM71WtomSjVmI_q/x720',
49 'timestamp': 1571838685,
50 'description': 'md5:73058bcd030aa12d991e4280d65fbebe',
51 'uploader': 'Moviepilot',
54 'uploader_id': 'x6nd9k',
55 'upload_date': '20191023',
58 'tags': ['Movie', 'Verleih', 'Neue Trailer'],
61 'url': 'https://www.moviepilot.de/movies/der-geiger-von-florenz/trailer',
63 'id': 'der-geiger-von-florenz',
64 'title': 'Der Geiger von Florenz',
67 'skip': 'No trailer for this movie.',
69 'url': 'https://www.moviepilot.de/movies/muellers-buero/',
72 'display_id': 'muellers-buero',
73 'title': 'Müllers Büro',
75 'description': 'md5:57501251c05cdc61ca314b7633e0312e',
76 'timestamp': 1287584475,
79 'upload_date': '20101020',
80 'thumbnail': r
're:https://\w+\.dmcdn\.net/v/SaMes1WfAm1d6maq_/x720',
81 'uploader': 'Moviepilot',
84 'tags': ['Alle Trailer', 'Movie', 'Verleih'],
85 'uploader_id': 'x6nd9k',
89 def _real_extract(self
, url
):
90 video_id
= self
._match
_id
(url
)
92 webpage
= self
._download
_webpage
(f
'https://www.moviepilot.de/movies/{video_id}/trailer', video_id
)
95 re
.match(r
'P(?P<hours>\d+)H(?P<mins>\d+)M(?P<secs>\d+)S',
96 self
._html
_search
_meta
('duration', webpage
, fatal
=False) or ''),
97 lambda mobj
: sum(float(x
) * y
for x
, y
in zip(mobj
.groups(), (3600, 60, 1))))
98 # _html_search_meta is not used since we don't want name=description to match
99 description
= self
._html
_search
_regex
(
100 '<meta[^>]+itemprop="description"[^>]+content="([^>"]+)"', webpage
, 'description', fatal
=False)
103 '_type': 'url_transparent',
104 'ie_key': DailymotionIE
.ie_key(),
105 'display_id': video_id
,
106 'title': self
._og
_search
_title
(webpage
),
107 'url': self
._html
_search
_meta
('embedURL', webpage
),
108 'thumbnail': self
._html
_search
_meta
('thumbnailURL', webpage
),
109 'description': description
,
110 'duration': duration
,
111 'timestamp': parse_iso8601(self
._html
_search
_meta
('uploadDate', webpage
), delimiter
=' ')