Repository: yt-dlp/yt-dlp
Issue category: Feature Request

[chaturbate] Support downloading non-public rooms again
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

_No response_

### Example URLs

Unable to provide any

### Provide a description that is worded well enough to be understood

Recent changes has dropped support for downloading any room with a status other than "public", even if you have access to that room, for instance via browser login and `--cookies-from-browser` option. This has worked before, and should work again.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://chaturbate.com/xiawa_xo/']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version master@2024.11.23.214708 from yt-dlp/yt-dlp-master-builds [fe70f20ae] (win_exe)
[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg 7.1-full_build-www.gyan.dev (setts), ffprobe 7.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-14.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1837 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.11.23.214708 from yt-dlp/yt-dlp-master-builds
yt-dlp is up to date (master@2024.11.23.214708 from yt-dlp/yt-dlp-master-builds)
[Chaturbate] Extracting URL: https://chaturbate.com/xiawa_xo/
[Chaturbate] xiawa_xo: Downloading JSON metadata
ERROR: [Chaturbate] xiawa_xo: Hidden session in progress
  File "yt_dlp\extractor\common.py", line 742, in extract
  File "yt_dlp\extractor\chaturbate.py", line 154, in _real_extract
  File "yt_dlp\extractor\chaturbate.py", line 65, in _extract_from_api
```



Functions to edit:
yt_dlp/extractor/chaturbate.py:ChaturbateIE._extract_from_api

Patch:
diff --git a/yt_dlp/extractor/chaturbate.py b/yt_dlp/extractor/chaturbate.py
index a40b7d39c7f4..d031d3985e33 100644
--- a/yt_dlp/extractor/chaturbate.py
+++ b/yt_dlp/extractor/chaturbate.py
@@ -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,