Skip to content

Commit

Permalink
[extractor/stripchat] Improve error message (#5475)
Browse files Browse the repository at this point in the history
Authored by: freezboltz
  • Loading branch information
freezboltz committed Nov 8, 2022
1 parent 581e86b commit 3b87f4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yt_dlp/extractor/stripchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ 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(
f'https://b-{server}.{host}/hls/{model_id}/{model_id}.m3u8',
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)

Expand Down

0 comments on commit 3b87f4d

Please sign in to comment.