From aa184427dcedf119fb412ec700cfedadf911c8e7 Mon Sep 17 00:00:00 2001 From: zachary Date: Wed, 12 Mar 2025 01:48:53 -0400 Subject: [PATCH] Fix API URL --- yt_dlp/extractor/chaturbate.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/chaturbate.py b/yt_dlp/extractor/chaturbate.py index d031d3985e..c5a15eb058 100644 --- a/yt_dlp/extractor/chaturbate.py +++ b/yt_dlp/extractor/chaturbate.py @@ -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):