Repository: yt-dlp/yt-dlp

Issue:
Stripchat No Video Formats Found
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.10.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched 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)
- [X] 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

Most parts of the world

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

When downloading, it would say that there are no video formats found. Stopped working since today, site usable/playable via browser.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [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://stripchat.com/sexgreat']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.20348-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-108625-g28ac2279ad-20221012 (setts), ffprobe N-108625-g28ac2279ad-20221012
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.10.04, Current version: 2022.10.04
yt-dlp is up to date (2022.10.04)
[debug] [Stripchat] Extracting URL: https://stripchat.com/sexgreat
[Stripchat] sexgreat: Downloading webpage
[Stripchat] sexgreat: Downloading m3u8 information
WARNING: [Stripchat] Failed to download m3u8 information: <urlopen error [Errno 11001] getaddrinfo failed>
ERROR: [Stripchat] sexgreat: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1477, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1574, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1632, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2569, in process_video_result
  File "yt_dlp\YoutubeDL.py", line 1027, in raise_no_formats
yt_dlp.utils.ExtractorError: [Stripchat] sexgreat: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
```



Discussion:
Having the same issue.

Resolving patch:
diff --git a/yt_dlp/extractor/stripchat.py b/yt_dlp/extractor/stripchat.py
--- a/yt_dlp/extractor/stripchat.py
+++ b/yt_dlp/extractor/stripchat.py
@@ -1,22 +1,15 @@
 from .common import InfoExtractor
-from ..compat import (
-    compat_str,
-)
-from ..utils import (
-    ExtractorError,
-    lowercase_escape,
-    try_get,
-)
+from ..utils import ExtractorError, lowercase_escape, traverse_obj
 
 
 class StripchatIE(InfoExtractor):
     _VALID_URL = r'https?://stripchat\.com/(?P<id>[^/?#]+)'
     _TESTS = [{
-        'url': 'https://stripchat.com/feel_me',
+        'url': 'https://stripchat.com/Joselin_Flower',
         'info_dict': {
-            'id': 'feel_me',
+            'id': 'Joselin_Flower',
             'ext': 'mp4',
-            'title': 're:^feel_me [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
+            'title': 're:^Joselin_Flower [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
             'description': str,
             'is_live': True,
             'age_limit': 18,
@@ -39,18 +32,22 @@ def _real_extract(self, url):
         if not data:
             raise ExtractorError('Unable to find configuration for stream.')
 
-        if try_get(data, lambda x: x['viewCam']['show'], dict):
+        if traverse_obj(data, ('viewCam', 'show'), expected_type=dict):
             raise ExtractorError('Model is in private show', expected=True)
-        elif not try_get(data, lambda x: x['viewCam']['model']['isLive'], bool):
+        elif not traverse_obj(data, ('viewCam', 'model', 'isLive'), expected_type=bool):
             raise ExtractorError('Model is offline', expected=True)
 
-        server = try_get(data, lambda x: x['viewCam']['viewServers']['flashphoner-hls'], compat_str)
-        host = try_get(data, lambda x: x['config']['data']['hlsStreamHost'], compat_str)
-        model_id = try_get(data, lambda x: x['viewCam']['model']['id'], int)
+        server = traverse_obj(data, ('viewCam', 'viewServers', 'flashphoner-hls'), expected_type=str)
+        model_id = traverse_obj(data, ('viewCam', 'model', 'id'), expected_type=int)
+
+        for host in traverse_obj(data, (
+                'config', 'data', (('featuresV2', 'hlsFallback', 'fallbackDomains', ...), 'hlsStreamHost'))):
+            formats = self._extract_m3u8_formats(
+                f'https://b-{server}.{host}/hls/{model_id}/{model_id}.m3u8',
+                video_id, ext='mp4', m3u8_id='hls', fatal=False, live=True)
+            if formats:
+                break
 
-        formats = self._extract_m3u8_formats(
-            'https://b-%s.%s/hls/%d/%d.m3u8' % (server, host, model_id, model_id),
-            video_id, ext='mp4', m3u8_id='hls', fatal=False, live=True)
         self._sort_formats(formats)
 
         return {


Test patch: