mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-18 23:03:05 +01:00
Incorporates fixes for the bad playlist IDs, support for the spankbang.party domain, and country impersonation
https://github.com/yt-dlp/yt-dlp/pull/7085 https://github.com/yt-dlp/yt-dlp/pull/10799
This commit is contained in:
parent
5ef88688b6
commit
1d6d933044
1 changed files with 6 additions and 0 deletions
|
@ -113,6 +113,7 @@ class SpankBangIE(InfoExtractor):
|
||||||
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_domain = re.search(r'https?://(?:[^/]+\.)?(spankbang\.(?:com|party))/', url).group(1)
|
||||||
stream_url = 'https://' + stream_domain + '/api/videos/stream'
|
stream_url = 'https://' + stream_domain + '/api/videos/stream'
|
||||||
stream = self._download_json(
|
stream = self._download_json(
|
||||||
|
@ -130,6 +131,11 @@ class SpankBangIE(InfoExtractor):
|
||||||
format_url = format_url[0]
|
format_url = format_url[0]
|
||||||
extract_format(format_id, format_url)
|
extract_format(format_id, format_url)
|
||||||
|
|
||||||
|
og_url = self._search_regex(
|
||||||
|
r'<meta property="og:url" content="(.*?)"', webpage, 'og:url', default=None)
|
||||||
|
if og_url:
|
||||||
|
video_id = self._search_regex(r'https://spankbang.(?:com|party)/([^/]+)/', og_url, 'video ID', default=None)
|
||||||
|
|
||||||
info = self._search_json_ld(webpage, video_id, default={})
|
info = self._search_json_ld(webpage, video_id, default={})
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
|
|
Loading…
Add table
Reference in a new issue