From 0e5e678f2b14a13e46c65326d5fa492cb7177f31 Mon Sep 17 00:00:00 2001 From: lulu <44802077+phoenixthrush@users.noreply.github.com> Date: Sat, 19 Jul 2025 04:14:16 +0200 Subject: [PATCH] Add URL substring sanitization and Fix Trailing comma missing --- yt_dlp/extractor/stripchat.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yt_dlp/extractor/stripchat.py b/yt_dlp/extractor/stripchat.py index 91d73334a..8c162024b 100644 --- a/yt_dlp/extractor/stripchat.py +++ b/yt_dlp/extractor/stripchat.py @@ -1,6 +1,5 @@ from .common import InfoExtractor - class StripchatIE(InfoExtractor): _VALID_URL = r'https?://(?:vr\.)?stripchat\.com/(?:cam/)?(?P[^/?&#]+)' _TESTS = [ @@ -31,12 +30,12 @@ class StripchatIE(InfoExtractor): 'skip_download': True, }, 'skip': 'Stream might be offline', - } + }, ] def _real_extract(self, url): video_id = self._match_id(url) - is_vr = 'vr.stripchat.com' in url + is_vr = url.startswith('http://vr.stripchat.com') or url.startswith('https://vr.stripchat.com') # The API is the same for both VR and non-VR # f'https://vr.stripchat.com/api/vr/v2/models/username/{video_id}' @@ -74,7 +73,7 @@ class StripchatIE(InfoExtractor): 'protocol': 'm3u8_native', 'format_id': 'source', 'quality': 10, - 'is_live': True + 'is_live': True, }) # Add all other available presets