mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 07:12:41 +00:00
[mixcloud] Fix extraction (closes #13958)
This commit is contained in:
parent
ea004d34f8
commit
d14d9d8903
1 changed files with 8 additions and 6 deletions
|
@ -91,12 +91,14 @@ class MixcloudIE(InfoExtractor):
|
||||||
if js_url:
|
if js_url:
|
||||||
js = self._download_webpage(js_url, track_id, fatal=False)
|
js = self._download_webpage(js_url, track_id, fatal=False)
|
||||||
if js:
|
if js:
|
||||||
key = self._search_regex(
|
KEY_RE_TEMPLATE = r'player\s*:\s*{.*?\b%s\s*:\s*(["\'])(?P<key>(?:(?!\1).)+)\1'
|
||||||
r'player\s*:\s*{.*?\bvalue\s*:\s*(["\'])(?P<key>(?:(?!\1).)+)\1',
|
for key_name in ('value', 'key_value'):
|
||||||
js, 'key', default=None, group='key')
|
key = self._search_regex(
|
||||||
if key and isinstance(key, compat_str):
|
KEY_RE_TEMPLATE % key_name, js, 'key',
|
||||||
self._keys.insert(0, key)
|
default=None, group='key')
|
||||||
self._current_key = key
|
if key and isinstance(key, compat_str):
|
||||||
|
self._keys.insert(0, key)
|
||||||
|
self._current_key = key
|
||||||
|
|
||||||
message = self._html_search_regex(
|
message = self._html_search_regex(
|
||||||
r'(?s)<div[^>]+class="global-message cloudcast-disabled-notice-light"[^>]*>(.+?)<(?:a|/div)',
|
r'(?s)<div[^>]+class="global-message cloudcast-disabled-notice-light"[^>]*>(.+?)<(?:a|/div)',
|
||||||
|
|
Loading…
Reference in a new issue