diff --git a/yt_dlp/extractor/spankbang.py b/yt_dlp/extractor/spankbang.py index 6805a72deb..1661feef34 100644 --- a/yt_dlp/extractor/spankbang.py +++ b/yt_dlp/extractor/spankbang.py @@ -17,7 +17,7 @@ class SpankBangIE(InfoExtractor): _VALID_URL = r'''(?x) https?:// - (?:[^/]+\.)?spankbang\.com/ + (?:[^/]+\.)?spankbang\.(?:com|party)/ (?: (?P[\da-z]+)/(?:video|play|embed)\b| [\da-z]+-(?P[\da-z]+)/playlist/[^/?#&]+ @@ -111,9 +111,10 @@ def extract_format(format_id, format_url): stream_key = self._search_regex( r'data-streamkey\s*=\s*(["\'])(?P(?:(?!\1).)+)\1', webpage, 'stream key', group='value') - + stream_domain = re.search(r'https?://(?:[^/]+\.)?(spankbang\.(?:com|party))/', url).group(1) + stream_url = 'https://' + stream_domain + '/api/videos/stream' stream = self._download_json( - 'https://spankbang.com/api/videos/stream', video_id, + stream_url, video_id, 'Downloading stream JSON', data=urlencode_postdata({ 'id': stream_key, 'data': 0, @@ -163,7 +164,7 @@ def extract_format(format_id, format_url): class SpankBangPlaylistIE(InfoExtractor): - _VALID_URL = r'https?://(?:[^/]+\.)?spankbang\.com/(?P[\da-z]+)/playlist/(?P[^/]+)' + _VALID_URL = r'https?://(?:[^/]+\.)?spankbang\.(?:com|party)/(?P[\da-z]+)/playlist/(?P[^/]+)' _TEST = { 'url': 'https://spankbang.com/ug0k/playlist/big+ass+titties', 'info_dict': {