mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 00:21:01 +01:00
[mixcloud] fix cloudcast data extraction(closes #22821)
This commit is contained in:
parent
3cf70bf159
commit
e993f1a095
@ -86,9 +86,10 @@ def _real_extract(self, url):
|
|||||||
r'<script id="relay-data" type="text/x-mixcloud">([^<]+)</script>',
|
r'<script id="relay-data" type="text/x-mixcloud">([^<]+)</script>',
|
||||||
webpage, 'play info'), 'play info')
|
webpage, 'play info'), 'play info')
|
||||||
for item in full_info_json:
|
for item in full_info_json:
|
||||||
item_data = try_get(
|
item_data = try_get(item, [
|
||||||
item, lambda x: x['cloudcast']['data']['cloudcastLookup'],
|
lambda x: x['cloudcast']['data']['cloudcastLookup'],
|
||||||
dict)
|
lambda x: x['cloudcastLookup']['data']['cloudcastLookup'],
|
||||||
|
], dict)
|
||||||
if try_get(item_data, lambda x: x['streamInfo']['url']):
|
if try_get(item_data, lambda x: x['streamInfo']['url']):
|
||||||
info_json = item_data
|
info_json = item_data
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user