From 6e461aaf7240fb50726fc18976bdd96c18e48603 Mon Sep 17 00:00:00 2001 From: lulu <44802077+phoenixthrush@users.noreply.github.com> Date: Sun, 20 Jul 2025 02:26:15 +0200 Subject: [PATCH] [ie/Stripchat] Fix NoneType crash --- yt_dlp/extractor/stripchat.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/stripchat.py b/yt_dlp/extractor/stripchat.py index 7a8fba5a3a..96303985e1 100644 --- a/yt_dlp/extractor/stripchat.py +++ b/yt_dlp/extractor/stripchat.py @@ -55,7 +55,12 @@ class StripchatIE(InfoExtractor): if model.get('status', {}) == 'off': raise UserNotLive(video_id=video_id) - if api_json.get('cam', {}).get('show', {}).get('details', {}).get('startMode', {}) == 'private': + cam = api_json.get('cam') or {} + show = cam.get('show') or {} + details = show.get('details') or {} + start_mode = details.get('startMode') + + if start_mode == 'private': raise ExtractorError('Room is currently in a private show', expected=True) # You can retrieve this value from "model.id," "streamName," or "cam.streamName"