From 4be1b54c55542ce837f330d411a9488db94bd883 Mon Sep 17 00:00:00 2001 From: lulu <44802077+phoenixthrush@users.noreply.github.com> Date: Sat, 19 Jul 2025 04:21:17 +0200 Subject: [PATCH] Fix URL substring sanitization --- yt_dlp/extractor/stripchat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/stripchat.py b/yt_dlp/extractor/stripchat.py index 8c162024bb..a8a9daa4b9 100644 --- a/yt_dlp/extractor/stripchat.py +++ b/yt_dlp/extractor/stripchat.py @@ -1,5 +1,8 @@ +import urllib + from .common import InfoExtractor + class StripchatIE(InfoExtractor): _VALID_URL = r'https?://(?:vr\.)?stripchat\.com/(?:cam/)?(?P[^/?&#]+)' _TESTS = [ @@ -35,7 +38,7 @@ class StripchatIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) - is_vr = url.startswith('http://vr.stripchat.com') or url.startswith('https://vr.stripchat.com') + is_vr = urllib.urlparse(url).hostname == '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}'