Add URL substring sanitization and Fix Trailing comma missing

pull/13769/head
lulu 1 month ago committed by GitHub
parent 8d8af92a5c
commit 0e5e678f2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,6 +1,5 @@
from .common import InfoExtractor from .common import InfoExtractor
class StripchatIE(InfoExtractor): class StripchatIE(InfoExtractor):
_VALID_URL = r'https?://(?:vr\.)?stripchat\.com/(?:cam/)?(?P<id>[^/?&#]+)' _VALID_URL = r'https?://(?:vr\.)?stripchat\.com/(?:cam/)?(?P<id>[^/?&#]+)'
_TESTS = [ _TESTS = [
@ -31,12 +30,12 @@ class StripchatIE(InfoExtractor):
'skip_download': True, 'skip_download': True,
}, },
'skip': 'Stream might be offline', 'skip': 'Stream might be offline',
} },
] ]
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(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 # The API is the same for both VR and non-VR
# f'https://vr.stripchat.com/api/vr/v2/models/username/{video_id}' # f'https://vr.stripchat.com/api/vr/v2/models/username/{video_id}'
@ -74,7 +73,7 @@ class StripchatIE(InfoExtractor):
'protocol': 'm3u8_native', 'protocol': 'm3u8_native',
'format_id': 'source', 'format_id': 'source',
'quality': 10, 'quality': 10,
'is_live': True 'is_live': True,
}) })
# Add all other available presets # Add all other available presets

Loading…
Cancel
Save