aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsepro <4618135+seproDev@users.noreply.github.com>2024-02-13 20:53:17 +0100
committerGitHub <noreply@github.com>2024-02-13 20:53:17 +0100
commit3dc9232e1aa58fe3c2d8cafb50e8162d6f0e891e (patch)
tree82c50ee69f0446ab07191e3f43c8883c7e47ebdd
parent9401736fd08767c58af45a1e36ff5929c5fa1ac9 (diff)
[ie/MagellanTV] Support episodes (#9199)
Authored by: seproDev
-rw-r--r--yt_dlp/extractor/magellantv.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/yt_dlp/extractor/magellantv.py b/yt_dlp/extractor/magellantv.py
index 0947a450a..6f2524ba2 100644
--- a/yt_dlp/extractor/magellantv.py
+++ b/yt_dlp/extractor/magellantv.py
@@ -28,12 +28,24 @@ class MagellanTVIE(InfoExtractor):
'tags': ['Investigation', 'True Crime', 'Justice', 'Europe'],
},
'params': {'skip_download': 'm3u8'},
+ }, {
+ 'url': 'https://www.magellantv.com/watch/celebration-nation',
+ 'info_dict': {
+ 'id': 'celebration-nation',
+ 'ext': 'mp4',
+ 'tags': ['Art & Culture', 'Human Interest', 'Anthropology', 'China', 'History'],
+ 'duration': 2640.0,
+ 'title': 'Ancestors',
+ },
+ 'params': {'skip_download': 'm3u8'},
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- data = self._search_nextjs_data(webpage, video_id)['props']['pageProps']['reactContext']['video']['detail']
+ data = traverse_obj(self._search_nextjs_data(webpage, video_id), (
+ 'props', 'pageProps', 'reactContext',
+ (('video', 'detail'), ('series', 'currentEpisode')), {dict}), get_all=False)
formats, subtitles = self._extract_m3u8_formats_and_subtitles(data['jwpVideoUrl'], video_id)
return {