From 3b87f4d9439e28cf568113409eafb304a519b2e1 Mon Sep 17 00:00:00 2001 From: Anant Murmu Date: Tue, 8 Nov 2022 12:14:47 +0530 Subject: [PATCH] [extractor/stripchat] Improve error message (#5475) Authored by: freezboltz --- yt_dlp/extractor/stripchat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/extractor/stripchat.py b/yt_dlp/extractor/stripchat.py index 8cd8388aa..d04aa1db0 100644 --- a/yt_dlp/extractor/stripchat.py +++ b/yt_dlp/extractor/stripchat.py @@ -40,6 +40,7 @@ def _real_extract(self, url): server = traverse_obj(data, ('viewCam', 'viewServers', 'flashphoner-hls'), expected_type=str) model_id = traverse_obj(data, ('viewCam', 'model', 'id'), expected_type=int) + formats = [] for host in traverse_obj(data, ( 'config', 'data', (('featuresV2', 'hlsFallback', 'fallbackDomains', ...), 'hlsStreamHost'))): formats = self._extract_m3u8_formats( @@ -47,6 +48,8 @@ def _real_extract(self, url): video_id, ext='mp4', m3u8_id='hls', fatal=False, live=True) if formats: break + if not formats: + self.raise_no_formats('No active streams found', expected=True) self._sort_formats(formats)