Git Product home page Git Product logo

spotify-playlist-downloader's Introduction

Spotify playlist downloader ๐Ÿ“‹ ๐ŸŽผ


๐Ÿ Python 3.10+

Reason

Recently I found a service, which allows downloading songs from Spotify, but does not allow downloading whole playlists. This program is aimed to fix this small detail.

Usage

usage: main.py [-h] [-d DIR] [-t THREADS] playlist

Download playlists from spotify

positional arguments:
  playlist              URL to playlist. Example: https://open.spotify.com/pla
                        ylist/37i9dQZF1E8OSy3MPBx3OT

options:
  -h, --help            show this help message and exit
  -d DIR, --dir DIR     Path to store tracks
  -t THREADS, --threads THREADS
                        Amount of tracks to store at the same time. Please, be
                        careful with that option, high numbers may cause
                        problems on the service we use under the hood, do not
                        let it down

Known problems

  • Script does not recognize more, than 30 tracks in playlist. Probably can be fixed by sending another http-request to Spotify

spotify-playlist-downloader's People

Contributors

teplinsky-maxim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spotify-playlist-downloader's Issues

The script was working, then suddenly stopped working and slowly got worse.

When I first downloaded this it worked perfectly for a couple weeks, then one day I tried to use it and it would take an hour to download 10 songs. A week or so later tried again and it downloaded instantly all songs but each mp3 was just 1:33 long silence. Now when I try to use it I get this response.

Extracting from https://open.spotify.com/playlist/3vnn5aBbZJc7zn0zLnUqdU ...
... 16 songs found
FIRST_COMPLETED
Traceback (most recent call last):
File "C:\Users\Logan\Desktop\SpotifyScript\spotify-playlist-downloader-master\main.py", line 59, in
asyncio.run(main())
File "C:\Users\Logan\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Logan\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\Logan\Desktop\SpotifyScript\spotify-playlist-downloader-master\main.py", line 55, in main
await process(args.playlist, args.dir, args.threads)
File "C:\Users\Logan\Desktop\SpotifyScript\spotify-playlist-downloader-master\main.py", line 31, in process
url, result = item.result()
File "C:\Users\Logan\Desktop\SpotifyScript\spotify-playlist-downloader-master\core\downloader\soundloader\soundloader.py", line 18, in download
downloader_metadata, etag = await self._start_download(track_metadata)
File "C:\Users\Logan\Desktop\SpotifyScript\spotify-playlist-downloader-master\core\downloader\soundloader\soundloader.py", line 92, in _start_download
data = await resp.json()
File "C:\Users\Logan\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client_reqrep.py", line 1104, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://api.soundloaders.com/download/track')

Code doesn't run, even -h not

C:\Users\user\Downloads\spotify-playlist-downloader-master>python main.py -h
Traceback (most recent call last):
File "C:\Users\user\Downloads\spotify-playlist-downloader-master\main.py", line 5, in
from core.downloader.soundloader.soundloader import SoundLoaderDownloader
File "C:\Users\user\Downloads\spotify-playlist-downloader-master\core\downloader\soundloader\soundloader.py", line 11, in
class SoundLoaderDownloader(DownloaderBase):
File "C:\Users\user\Downloads\spotify-playlist-downloader-master\core\downloader\soundloader\soundloader.py", line 37, in SoundLoaderDownloader
async def _get_download_path(self, track_id: str, etag: str) -> tuple[dict | None, str]:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

how to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.