Advertisement
xosski

SoundCloud Downloader

Jun 16th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import os
  2. import yt_dlp
  3.  
  4. # Make sure the "downloads" folder exists
  5. os.makedirs("downloads", exist_ok=True)
  6.  
  7. url = "SoundCloud URL Here"
  8. opts = {
  9. 'format': 'bestaudio',
  10. 'outtmpl': r"downloads/%(title)s.%(ext)s",
  11. }
  12.  
  13. with yt_dlp.YoutubeDL(opts) as ydl:
  14. ydl.download([url])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement