{"id":28216,"library":"spotify-web-downloader","title":"Spotify Web Downloader","description":"A Python CLI application for downloading songs and music videos from Spotify by analyzing Spotify URLs, fetching metadata, and sourcing audio/video from YouTube or other providers. Version 1.8.1, requires Python >=3.8. Active maintenance.","status":"active","version":"1.8.1","language":"python","source_language":"en","source_url":"https://github.com/spotify/spotify-web-downloader","tags":["spotify","downloader","cli","music","youtube"],"install":[{"cmd":"pip install spotify-web-downloader","lang":"bash","label":"Latest PyPI"}],"dependencies":[],"imports":[{"note":"Wrong path leads to ModuleNotFoundError, correct import uses lowercase module name.","wrong":"from spotify_web_downloader.SpotifyDownloader import SpotifyDownloader","symbol":"SpotifyDownloader","correct":"from spotify_web_downloader import SpotifyDownloader"}],"quickstart":{"code":"from spotify_web_downloader import SpotifyDownloader\n\ndownloader = SpotifyDownloader()\n\ntrack_url = \"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT\"\nresult = downloader.download_track(track_url)\nprint(f\"Downloaded: {result['title']} by {result['artist']}\")","lang":"python","description":"Initialize the downloader, provide a Spotify track URL, and download the audio."},"warnings":[{"fix":"Consider using Spotify's official API and a legal streaming source.","message":"The library may violate Spotify's Terms of Service as it bypasses official APIs. Use at your own risk; accounts can be banned.","severity":"gotcha","affected_versions":"all"},{"fix":"Remove the `--no-ytm` argument and configure via `~/.config/spotify-web-downloader/config.json`.","message":"Version 1.8.0 removed the `--no-ytm` flag in favor of a config file. Scripts using the old flag will fail.","severity":"breaking","affected_versions":">=1.8.0, <1.8.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with `pip install spotify-web-downloader` and import using underscores: `from spotify_web_downloader import SpotifyDownloader`.","cause":"Package not installed or imported with wrong name (hyphen vs underscore).","error":"ModuleNotFoundError: No module named 'spotify_web_downloader'"},{"fix":"Ensure valid `sp_dc` and `sp_key` cookies are set via environment variables or config file. See https://github.com/spotify/spotify-web-downloader#authentication","cause":"Spotify cookies expired or not provided correctly.","error":"spotify_web_downloader.exceptions.AuthenticationError: Invalid credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}