mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2025-06-05 21:49:13 +02:00
[mixcloud:playlist:base] Fix video id extraction in flat playlist mode (refs #27787)
This commit is contained in:
@@ -251,11 +251,9 @@ class MixcloudPlaylistBaseIE(MixcloudBaseIE):
|
|||||||
cloudcast_url = cloudcast.get('url')
|
cloudcast_url = cloudcast.get('url')
|
||||||
if not cloudcast_url:
|
if not cloudcast_url:
|
||||||
continue
|
continue
|
||||||
video_id = cloudcast.get('slug')
|
slug = try_get(cloudcast, lambda x: x['slug'], compat_str)
|
||||||
if video_id:
|
owner_username = try_get(cloudcast, lambda x: x['owner']['username'], 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
|
||||||
if owner_username:
|
|
||||||
video_id = '%s_%s' % (owner_username, video_id)
|
|
||||||
entries.append(self.url_result(
|
entries.append(self.url_result(
|
||||||
cloudcast_url, MixcloudIE.ie_key(), video_id))
|
cloudcast_url, MixcloudIE.ie_key(), video_id))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user