Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[soundcloud] Fix paged playlist download archival #19086

Closed
wants to merge 7 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 14 additions & 3 deletions youtube_dl/extractor/soundcloud.py
Expand Up @@ -397,13 +397,24 @@ def resolve_permalink_url(candidates):
if isinstance(cand, dict):
permalink_url = cand.get('permalink_url')
entry_id = self._extract_id(cand)
title = cand.get('title')
if permalink_url and permalink_url.startswith('http'):
return permalink_url, entry_id
return permalink_url, entry_id, title
CoryDHall marked this conversation as resolved.
Show resolved Hide resolved

for e in collection:
permalink_url, entry_id = resolve_permalink_url((e, e.get('track'), e.get('playlist')))
extractor = None
if isinstance(e.get('track'), dict):
CoryDHall marked this conversation as resolved.
Show resolved Hide resolved
# if entry has track data, attach extractor key
extractor = SoundcloudIE.ie_key()

permalink_url, entry_id, entry_title = resolve_permalink_url(
(e, e.get('track'), e.get('playlist')))
if permalink_url:
entries.append(self.url_result(permalink_url, video_id=entry_id))
entry_data = self.url_result(
CoryDHall marked this conversation as resolved.
Show resolved Hide resolved
permalink_url,
ie=extractor, video_id=entry_id, video_title=entry_title)

entries.append(entry_data)

next_href = response.get('next_href')
if not next_href:
Expand Down