mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 07:51:26 +01:00
Compare commits
6 Commits
834a5907c1
...
8a9a5de241
Author | SHA1 | Date | |
---|---|---|---|
|
8a9a5de241 | ||
|
e6bc3cd389 | ||
|
eb112c9467 | ||
|
c54853f320 | ||
|
de17d2ec5a | ||
|
0936b27e01 |
|
@ -31,6 +31,7 @@ class DuoplayIE(InfoExtractor):
|
|||
'season_number': 2,
|
||||
'episode': 'Operatsioon "Öö"',
|
||||
'episode_number': 12,
|
||||
'episode_id': 24,
|
||||
},
|
||||
}, {
|
||||
'note': 'Empty title',
|
||||
|
@ -39,7 +40,7 @@ class DuoplayIE(InfoExtractor):
|
|||
'info_dict': {
|
||||
'id': '17_14',
|
||||
'ext': 'mp4',
|
||||
'title': 'Episode 14',
|
||||
'title': 'Ühikarotid',
|
||||
'thumbnail': r're:https://.+\.jpg(?:\?c=\d+)?$',
|
||||
'description': 'md5:4719b418e058c209def41d48b601276e',
|
||||
'upload_date': '20100916',
|
||||
|
@ -48,13 +49,35 @@ class DuoplayIE(InfoExtractor):
|
|||
'series_id': '17',
|
||||
'season': 'Season 2',
|
||||
'season_number': 2,
|
||||
'episode': 'Episode 14',
|
||||
'episode_number': 14,
|
||||
'episode': None,
|
||||
'episode_number': None,
|
||||
'episode_id': 14,
|
||||
},
|
||||
}, {
|
||||
'note': 'Movie',
|
||||
'url': 'https://duoplay.ee/4325/naljamangud',
|
||||
'md5': '2b0bcac4159a08b1844c2bfde06b1199',
|
||||
'info_dict': {
|
||||
'id': '4325',
|
||||
'ext': 'mp4',
|
||||
'title': 'Näljamängud',
|
||||
'thumbnail': r're:https://.+\.jpg(?:\?c=\d+)?$',
|
||||
'description': 'md5:fb35f5eb2ff46cdb82e4d5fbe7b49a13',
|
||||
'cast': ['Jennifer Lawrence', 'Josh Hutcherson', 'Liam Hemsworth'],
|
||||
'upload_date': '20231109',
|
||||
'timestamp': 1699552800,
|
||||
'series': 'Näljamängud',
|
||||
'series_id': '4325',
|
||||
'season': 'Season 1',
|
||||
'season_number': 1,
|
||||
'episode': 'Episode 0',
|
||||
'episode_number': 0,
|
||||
'episode_id': 0,
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
telecast_id, episode = self._match_valid_url(url).groups()
|
||||
telecast_id, episode = self._match_valid_url(url).group('id', 'ep')
|
||||
video_id = join_nonempty(telecast_id, episode, delim='_')
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
video_player = try_call(lambda: extract_attributes(
|
||||
|
@ -66,9 +89,10 @@ class DuoplayIE(InfoExtractor):
|
|||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': episode_attr.get('title') if episode_attr.get('category') == 'movies' else (
|
||||
traverse_obj(episode_attr, 'subtitle', ('episode_nr', {lambda x: f'Episode {x}' if x else None}), 'title')),
|
||||
'formats': self._extract_m3u8_formats(video_player['manifest-url'], video_id, 'mp4'),
|
||||
**traverse_obj(episode_attr, {
|
||||
'title': (None, ('subtitle', ('episode_id', {lambda x: f'Episode {x}'}))),
|
||||
'description': 'synopsis',
|
||||
'thumbnail': ('images', 'original'),
|
||||
'timestamp': ('airtime', {lambda x: unified_timestamp(x + ' +0200')}),
|
||||
|
@ -76,6 +100,8 @@ class DuoplayIE(InfoExtractor):
|
|||
'series_id': ('telecast_id', {str_or_none}),
|
||||
'season_number': ('season_id', {int_or_none}),
|
||||
'episode': 'subtitle',
|
||||
'episode_number': (None, ('episode_nr', 'episode_id'), {int_or_none}),
|
||||
}, get_all=False),
|
||||
'episode_number': ('episode_nr', {int_or_none}),
|
||||
'episode_id': ('episode_id', {int_or_none}),
|
||||
'cast': ('cast', {lambda x: x.split(', ')}),
|
||||
}),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user