Skip to content

Commit

Permalink
[mixcloud] fix cloudcast data extraction(closes #22821)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine authored and pareronia committed Jun 22, 2020
1 parent 52b7fed commit 3842171
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions youtube_dl/extractor/mixcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ def _real_extract(self, url):
r'<script id="relay-data" type="text/x-mixcloud">([^<]+)</script>',
webpage, 'play info'), 'play info')
for item in full_info_json:
item_data = try_get(
item, lambda x: x['cloudcast']['data']['cloudcastLookup'],
dict)
item_data = try_get(item, [
lambda x: x['cloudcast']['data']['cloudcastLookup'],
lambda x: x['cloudcastLookup']['data']['cloudcastLookup'],
], dict)
if try_get(item_data, lambda x: x['streamInfo']['url']):
info_json = item_data
break
Expand Down

0 comments on commit 3842171

Please sign in to comment.