Skip to content

Commit

Permalink
[extractor/stripchat] Fix extractor (yt-dlp#7306)
Browse files Browse the repository at this point in the history
Closes yt-dlp#7305
Authored by: foreignBlade
  • Loading branch information
foreignBlade authored and aalsuwaidi committed Apr 21, 2024
1 parent 56e1966 commit e747759
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions yt_dlp/extractor/stripchat.py
Expand Up @@ -42,14 +42,13 @@ def _real_extract(self, url):
elif not traverse_obj(data, ('viewCam', 'model', 'isLive'), expected_type=bool):
raise UserNotLive(video_id=video_id)

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', (
(('features', 'featuresV2'), 'hlsFallback', 'fallbackDomains', ...), 'hlsStreamHost'))):
formats = self._extract_m3u8_formats(
f'https://b-{server}.{host}/hls/{model_id}/master/{model_id}_auto.m3u8',
f'https://edge-hls.{host}/hls/{model_id}/master/{model_id}_auto.m3u8',
video_id, ext='mp4', m3u8_id='hls', fatal=False, live=True)
if formats:
break
Expand Down

0 comments on commit e747759

Please sign in to comment.