Compare commits

..

No commits in common. "8a9a5de241736582e4dd5201b7a54c1d884a6dc5" and "834a5907c1e6e12430c145681c23c48f3c6eb557" have entirely different histories.

View File

@ -31,7 +31,6 @@ class DuoplayIE(InfoExtractor):
'season_number': 2,
'episode': 'Operatsioon "Öö"',
'episode_number': 12,
'episode_id': 24,
},
}, {
'note': 'Empty title',
@ -40,7 +39,7 @@ class DuoplayIE(InfoExtractor):
'info_dict': {
'id': '17_14',
'ext': 'mp4',
'title': 'Ühikarotid',
'title': 'Episode 14',
'thumbnail': r're:https://.+\.jpg(?:\?c=\d+)?$',
'description': 'md5:4719b418e058c209def41d48b601276e',
'upload_date': '20100916',
@ -49,35 +48,13 @@ class DuoplayIE(InfoExtractor):
'series_id': '17',
'season': 'Season 2',
'season_number': 2,
'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,
'episode': 'Episode 14',
'episode_number': 14,
},
}]
def _real_extract(self, url):
telecast_id, episode = self._match_valid_url(url).group('id', 'ep')
telecast_id, episode = self._match_valid_url(url).groups()
video_id = join_nonempty(telecast_id, episode, delim='_')
webpage = self._download_webpage(url, video_id)
video_player = try_call(lambda: extract_attributes(
@ -89,10 +66,9 @@ 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')}),
@ -100,8 +76,6 @@ class DuoplayIE(InfoExtractor):
'series_id': ('telecast_id', {str_or_none}),
'season_number': ('season_id', {int_or_none}),
'episode': 'subtitle',
'episode_number': ('episode_nr', {int_or_none}),
'episode_id': ('episode_id', {int_or_none}),
'cast': ('cast', {lambda x: x.split(', ')}),
}),
'episode_number': (None, ('episode_nr', 'episode_id'), {int_or_none}),
}, get_all=False),
}