1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 08:58:30 +00:00

Fix API URL

This commit is contained in:
zachary 2025-03-12 01:48:53 -04:00
parent 05c8023a27
commit aa184427dc

View File

@ -51,15 +51,14 @@ class ChaturbateIE(InfoExtractor):
def _extract_from_api(self, video_id, tld):
response = self._download_json(
f'https://chaturbate.{tld}/get_edge_hls_url_ajax/', video_id,
data=urlencode_postdata({'room_slug': video_id}),
f'https://chaturbate.{tld}/api/chatvideocontext/{video_id}', video_id,
headers={
**self.geo_verification_headers(),
'X-Requested-With': 'XMLHttpRequest',
'Accept': 'application/json',
}, fatal=False, impersonate=True) or {}
m3u8_url = response.get('url')
m3u8_url = response.get('hls_source').replace('live-edge', 'live-fhls').replace('playlist.m3u8', 'playlist_sfm4s.m3u8')
if not m3u8_url:
status = response.get('room_status')
if error := self._ERROR_MAP.get(status):