|
|
@ -1,5 +1,8 @@
|
|
|
|
|
|
|
|
import urllib
|
|
|
|
|
|
|
|
|
|
|
|
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 = [
|
|
|
@ -35,7 +38,7 @@ class StripchatIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
def _real_extract(self, url):
|
|
|
|
video_id = self._match_id(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
|
|
|
|
# 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}'
|
|
|
|