Skip to content

Commit

Permalink
Merge branch 'yt-dlp:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
observeroftime02 authored Nov 25, 2024
2 parents 5856c1e + 4b5eec0 commit 56bbc46
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions yt_dlp/extractor/chaturbate.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,16 @@ def _extract_from_api(self, video_id, tld):
'Accept': 'application/json',
}, fatal=False, impersonate=True) or {}

status = response.get('room_status')
if status != 'public':
m3u8_url = response.get('url')
if not m3u8_url:
status = response.get('room_status')
if error := self._ERROR_MAP.get(status):
raise ExtractorError(error, expected=True)
self.report_warning('Falling back to webpage extraction')
if status == 'public':
self.raise_geo_restricted()
self.report_warning(f'Got status "{status}" from API; falling back to webpage extraction')
return None

m3u8_url = response.get('url')
if not m3u8_url:
self.raise_geo_restricted()

return {
'id': video_id,
'title': video_id,
Expand Down

0 comments on commit 56bbc46

Please sign in to comment.