aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/youtube/_base.py
diff options
context:
space:
mode:
authorcoletdjnz <coletdjnz@protonmail.com>2025-03-29 11:13:09 +1300
committerGitHub <noreply@github.com>2025-03-29 11:13:09 +1300
commit6a6d97b2cbc78f818de05cc96edcdcfd52caa259 (patch)
tree7f398ab8eee95980feefe1baa80988b2d77d26cb /yt_dlp/extractor/youtube/_base.py
parent3ddbebb3c69c9da88d8030d54d9bff9c8f49465c (diff)
[ie/youtube:tab] Fix playlist continuation extraction (#12777)
Fixes https://github.com/yt-dlp/yt-dlp/issues/12759 Authored by: coletdjnz
Diffstat (limited to 'yt_dlp/extractor/youtube/_base.py')
-rw-r--r--yt_dlp/extractor/youtube/_base.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/yt_dlp/extractor/youtube/_base.py b/yt_dlp/extractor/youtube/_base.py
index ac0604a9c..8ca7d898e 100644
--- a/yt_dlp/extractor/youtube/_base.py
+++ b/yt_dlp/extractor/youtube/_base.py
@@ -803,12 +803,14 @@ class YoutubeBaseInfoExtractor(InfoExtractor):
@classmethod
def _extract_continuation_ep_data(cls, continuation_ep: dict):
- if isinstance(continuation_ep, dict):
- continuation = try_get(
- continuation_ep, lambda x: x['continuationCommand']['token'], str)
+ continuation_commands = traverse_obj(
+ continuation_ep, ('commandExecutorCommand', 'commands', ..., {dict}))
+ continuation_commands.append(continuation_ep)
+ for command in continuation_commands:
+ continuation = traverse_obj(command, ('continuationCommand', 'token', {str}))
if not continuation:
- return
- ctp = continuation_ep.get('clickTrackingParams')
+ continue
+ ctp = command.get('clickTrackingParams')
return cls._build_api_continuation_query(continuation, ctp)
@classmethod