Skip to content

Commit

Permalink
[mixcloud:playlist:base] Fix video id extraction in flat playlist mod…
Browse files Browse the repository at this point in the history
…e (refs ytdl-org#27787)
  • Loading branch information
dstftw authored and ThirumalaiK committed Jan 28, 2021
1 parent 8f858bf commit d6d5f7f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions youtube_dl/extractor/mixcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,9 @@ def _real_extract(self, url):
cloudcast_url = cloudcast.get('url')
if not cloudcast_url:
continue
video_id = cloudcast.get('slug')
if video_id:
owner_username = try_get(cloudcast, lambda x: x['owner']['username'], compat_str)
if owner_username:
video_id = '%s_%s' % (owner_username, video_id)
slug = try_get(cloudcast, lambda x: x['slug'], compat_str)
owner_username = try_get(cloudcast, lambda x: x['owner']['username'], compat_str)
video_id = '%s_%s' % (owner_username, slug) if slug and owner_username else None
entries.append(self.url_result(
cloudcast_url, MixcloudIE.ie_key(), video_id))

Expand Down

0 comments on commit d6d5f7f

Please sign in to comment.