mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 06:10:12 +01:00
Merge 64faaf01a2
into f919729538
This commit is contained in:
commit
4c7aca0bc0
|
@ -17,7 +17,7 @@
|
||||||
class SpankBangIE(InfoExtractor):
|
class SpankBangIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:[^/]+\.)?spankbang\.com/
|
(?:[^/]+\.)?spankbang\.(?:com|party)/
|
||||||
(?:
|
(?:
|
||||||
(?P<id>[\da-z]+)/(?:video|play|embed)\b|
|
(?P<id>[\da-z]+)/(?:video|play|embed)\b|
|
||||||
[\da-z]+-(?P<id_2>[\da-z]+)/playlist/[^/?#&]+
|
[\da-z]+-(?P<id_2>[\da-z]+)/playlist/[^/?#&]+
|
||||||
|
@ -113,9 +113,10 @@ def extract_format(format_id, format_url):
|
||||||
stream_key = self._search_regex(
|
stream_key = self._search_regex(
|
||||||
r'data-streamkey\s*=\s*(["\'])(?P<value>(?:(?!\1).)+)\1',
|
r'data-streamkey\s*=\s*(["\'])(?P<value>(?:(?!\1).)+)\1',
|
||||||
webpage, 'stream key', group='value')
|
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(
|
stream = self._download_json(
|
||||||
'https://spankbang.com/api/videos/stream', video_id,
|
stream_url, video_id,
|
||||||
'Downloading stream JSON', data=urlencode_postdata({
|
'Downloading stream JSON', data=urlencode_postdata({
|
||||||
'id': stream_key,
|
'id': stream_key,
|
||||||
'data': 0,
|
'data': 0,
|
||||||
|
@ -165,7 +166,7 @@ def extract_format(format_id, format_url):
|
||||||
|
|
||||||
|
|
||||||
class SpankBangPlaylistIE(InfoExtractor):
|
class SpankBangPlaylistIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:[^/]+\.)?spankbang\.com/(?P<id>[\da-z]+)/playlist/(?P<display_id>[^/]+)'
|
_VALID_URL = r'https?://(?:[^/]+\.)?spankbang\.(?:com|party)/(?P<id>[\da-z]+)/playlist/(?P<display_id>[^/]+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'https://spankbang.com/ug0k/playlist/big+ass+titties',
|
'url': 'https://spankbang.com/ug0k/playlist/big+ass+titties',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user