2022-04-07 02:26:12 +00:00
|
|
|
from .dailymotion import DailymotionIE
|
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class MoviepilotIE(InfoExtractor):
|
|
|
|
_IE_NAME = 'moviepilot'
|
|
|
|
_IE_DESC = 'Moviepilot trailer'
|
|
|
|
_VALID_URL = r'https?://(?:www\.)?moviepilot\.de/movies/(?P<id>[^/]+)'
|
|
|
|
|
|
|
|
_TESTS = [{
|
|
|
|
'url': 'https://www.moviepilot.de/movies/interstellar-2/',
|
|
|
|
'info_dict': {
|
2023-02-12 04:15:16 +00:00
|
|
|
'id': 'x7xdpkk',
|
2022-04-07 02:26:12 +00:00
|
|
|
'display_id': 'interstellar-2',
|
|
|
|
'ext': 'mp4',
|
|
|
|
'title': 'Interstellar',
|
2023-02-12 04:15:16 +00:00
|
|
|
'thumbnail': r're:https://\w+\.dmcdn\.net/v/SaV-q1ZganMw4HVXg/x1080',
|
|
|
|
'timestamp': 1605010596,
|
|
|
|
'description': 'md5:0ae9cb452af52610c9ffc60f2fd0474c',
|
2022-04-07 02:26:12 +00:00
|
|
|
'uploader': 'Moviepilot',
|
|
|
|
'like_count': int,
|
|
|
|
'view_count': int,
|
|
|
|
'uploader_id': 'x6nd9k',
|
2023-02-12 04:15:16 +00:00
|
|
|
'upload_date': '20201110',
|
|
|
|
'duration': 97,
|
2022-04-07 02:26:12 +00:00
|
|
|
'age_limit': 0,
|
2023-02-12 04:15:16 +00:00
|
|
|
'tags': ['Alle Trailer', 'Movie', 'Verleih'],
|
2022-04-07 02:26:12 +00:00
|
|
|
},
|
|
|
|
}, {
|
|
|
|
'url': 'https://www.moviepilot.de/movies/interstellar-2/trailer',
|
|
|
|
'only_matching': True,
|
|
|
|
}, {
|
|
|
|
'url': 'https://www.moviepilot.de/movies/interstellar-2/kinoprogramm/berlin',
|
|
|
|
'only_matching': True,
|
|
|
|
}, {
|
|
|
|
'url': 'https://www.moviepilot.de/movies/queen-slim/trailer',
|
|
|
|
'info_dict': {
|
|
|
|
'id': 'x7xj6o7',
|
|
|
|
'display_id': 'queen-slim',
|
|
|
|
'title': 'Queen & Slim',
|
|
|
|
'ext': 'mp4',
|
2023-02-12 04:15:16 +00:00
|
|
|
'thumbnail': r're:https://\w+\.dmcdn\.net/v/SbUM71ZeG2N975lf2/x1080',
|
|
|
|
'timestamp': 1605555825,
|
|
|
|
'description': 'md5:83228bb86f5367dd181447fdc4873989',
|
2022-04-07 02:26:12 +00:00
|
|
|
'uploader': 'Moviepilot',
|
|
|
|
'like_count': int,
|
|
|
|
'view_count': int,
|
|
|
|
'uploader_id': 'x6nd9k',
|
2023-02-12 04:15:16 +00:00
|
|
|
'upload_date': '20201116',
|
2022-04-07 02:26:12 +00:00
|
|
|
'duration': 138,
|
|
|
|
'age_limit': 0,
|
|
|
|
'tags': ['Movie', 'Verleih', 'Neue Trailer'],
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
'url': 'https://www.moviepilot.de/movies/der-geiger-von-florenz/trailer',
|
|
|
|
'info_dict': {
|
|
|
|
'id': 'der-geiger-von-florenz',
|
|
|
|
'title': 'Der Geiger von Florenz',
|
|
|
|
'ext': 'mp4',
|
|
|
|
},
|
|
|
|
'skip': 'No trailer for this movie.',
|
|
|
|
}, {
|
|
|
|
'url': 'https://www.moviepilot.de/movies/muellers-buero/',
|
|
|
|
'info_dict': {
|
|
|
|
'id': 'x7xcw1i',
|
|
|
|
'display_id': 'muellers-buero',
|
|
|
|
'title': 'Müllers Büro',
|
|
|
|
'ext': 'mp4',
|
2023-02-12 04:15:16 +00:00
|
|
|
'description': 'md5:4d23a8f4ca035196cd4523863c4fe5a4',
|
|
|
|
'timestamp': 1604958457,
|
2022-04-07 02:26:12 +00:00
|
|
|
'age_limit': 0,
|
|
|
|
'duration': 82,
|
2023-02-12 04:15:16 +00:00
|
|
|
'upload_date': '20201109',
|
|
|
|
'thumbnail': r're:https://\w+\.dmcdn\.net/v/SaMes1Zg3lxLv9j5u/x1080',
|
2022-04-07 02:26:12 +00:00
|
|
|
'uploader': 'Moviepilot',
|
|
|
|
'like_count': int,
|
|
|
|
'view_count': int,
|
|
|
|
'tags': ['Alle Trailer', 'Movie', 'Verleih'],
|
|
|
|
'uploader_id': 'x6nd9k',
|
|
|
|
},
|
|
|
|
}]
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(url)
|
|
|
|
|
|
|
|
webpage = self._download_webpage(f'https://www.moviepilot.de/movies/{video_id}/trailer', video_id)
|
|
|
|
|
2023-02-12 04:15:16 +00:00
|
|
|
clip = self._search_nextjs_data(webpage, video_id)['props']['initialProps']['pageProps']
|
2022-04-07 02:26:12 +00:00
|
|
|
|
|
|
|
return {
|
|
|
|
'_type': 'url_transparent',
|
|
|
|
'ie_key': DailymotionIE.ie_key(),
|
|
|
|
'display_id': video_id,
|
2023-02-12 04:15:16 +00:00
|
|
|
'title': clip.get('title'),
|
|
|
|
'url': f'https://www.dailymotion.com/video/{clip["videoRemoteId"]}',
|
|
|
|
'description': clip.get('summary'),
|
2022-04-07 02:26:12 +00:00
|
|
|
}
|