[soundcloud] More metadata in flat-playlist
Author: DystaCreated Dec 2, 2021Updated Sep 16, 2026
Labelssite-enhancement
Checklist
- I'm reporting a feature request
- I've verified that I'm running yt-dlp version 2021.12.01. (update instructions)
- I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I've read the guidelines for opening an issue
Description
When embed yt-dlp on your program and you do a search with soundcloud, the produced output it's not exploitable. See the code snippet below :
from yt_dlp import YoutubeDL
def main():
YTDL_FORMAT_OPTION: dict = {
"format": "bestaudio/best",
"outtmpl": "%(extractor)s-%(id)s-%(title)s.%(ext)s",
"restrictfilenames": True,
"nocheckcertificate": True,
"ignoreerrors": False,
"logtostderr": False,
"quiet": True,
"no_warnings": True,
"default_search": "auto",
"source_address": "0.0.0.0",
"usenetrc": True,
"socket_timeout": 3,
}
with YoutubeDL(params=YTDL_FORMAT_OPTION) as ytdl:
info = ytdl.extract_info(url="scsearch10:slowdive", download=False, process=False) # process set to False to avoid retrive all useless informations
info2 = ytdl.extract_info(url="ytsearch10:slowdive", download=False, process=False)
for e in info["entries"]:
print(e)
for e in info2["entries"]:
print(e)
if __name__ == "__main__":
main()
And the produced output
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/519192720', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/256094585', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/172639544', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/323812800', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/254961512', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/1138931146', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/253133742', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/309398002', 'ie_key': 'Soundcloud'}
{'_type': 'url', 'url': 'https://api.soundcloud.com/tracks/89394347', 'ie_key': 'Soundcloud'}
###########################
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'MKYY0IlTMw4', 'url': 'https://www.youtube.com/watch?v=MKYY0IlTMw4', 'title': 'Slowdive - When the Sun Hits (Audio)', 'description': None, 'duration': 290.0, 'view_count': 2615090, 'uploader': 'SlowdiveVEVO'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'u23v25GiB4s', 'url': 'https://www.youtube.com/watch?v=u23v25GiB4s', 'title': 'Slowdive // Slowdive (2017 Full Album)', 'description': None, 'duration': 3109.0, 'view_count': 441557, 'uploader': 'Sound Experience'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'gwgq-IWtcPE', 'url': 'https://www.youtube.com/watch?v=gwgq-IWtcPE', 'title': 'Slowdive - Full Performance (Live on KEXP)', 'description': None, 'duration': 1968.0, 'view_count': 1345564, 'uploader': 'KEXP'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'BxwAPBxc0lU', 'url': 'https://www.youtube.com/watch?v=BxwAPBxc0lU', 'title': 'Slowdive - Sugar for the Pill (Official Video)', 'description': None, 'duration': 272.0, 'view_count': 6699494, 'uploader': 'SlowdiveVEVO'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'ogCih4OavoY', 'url': 'https://www.youtube.com/watch?v=ogCih4OavoY', 'title': 'Slowdive - Star Roving (Official Audio)', 'description': None, 'duration': 339.0, 'view_count': 5322037, 'uploader': 'Dead Oceans'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'jkM3M3zGcGE', 'url': 'https://www.youtube.com/watch?v=jkM3M3zGcGE', 'title': 'Slowdive - Alison (Video)', 'description': None, 'duration': 228.0, 'view_count': 1854391, 'uploader': 'SlowdiveVEVO'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'mbgWjujwvwo', 'url': 'https://www.youtube.com/watch?v=mbgWjujwvwo', 'title': 'Slowdive - Shine (Video)', 'description': None, 'duration': 316.0, 'view_count': 1651964, 'uploader': 'SlowdiveVEVO'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': '6ey4yAgLZlw', 'url': 'https://www.youtube.com/watch?v=6ey4yAgLZlw', 'title': 'Slowdive - Sleep', 'description': None, 'duration': 259.0, 'view_count': 8820890, 'uploader': 'Chariklia Chounou'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'AMPpMfjnn-I', 'url': 'https://www.youtube.com/watch?v=AMPpMfjnn-I', 'title': 'Slowdive - Alison', 'description': None, 'duration': 292.0, 'view_count': 3867461, 'uploader': 'kokocrunch'}
{'_type': 'url', 'ie_key': 'Youtube', 'id': 'Oc2x6_7-c0U', 'url': 'https://www.youtube.com/watch?v=Oc2x6_7-c0U', 'title': 'Slowdive - Just For a Day(1991)(Dreamwave)(Shoegaze)(Surreal)', 'description': None, 'duration': 2626.0, 'view_count': 68168, 'uploader': 'Mr. Kpm'}
As you can see, it's impossible with the Soundcloud output dict to define what we get compared to youtube output.
So my request is, it's possible to produce an output similare to the one we get with ytsearch but with the scsearch?
Source: yt-dlp/yt-dlp