GithubHelp home page GithubHelp logo

the-batfish / spotify-downloader Goto Github PK

View Code? Open in Web Editor NEW
297.0 8.0 29.0 150.78 MB

Download songs,playlists and even albums from spotify within a matter of seconds in a variety of different formats like m4a,mp3,wav and even flac with spotify downloader

License: GNU General Public License v3.0

Python 100.00%
mutagen pytube spotipy ytmusicapi

spotify-downloader's Introduction

Disclaimer:- This program does not download the audio from spotify, but instead downloads the opus audio stream from youtube and adds metadata, album art etc. from spotify.

Usage and installation

If you are going to be using only the exe:

Just download the latest version of exe from the releases tab on this repository and open the exe and paste a playlist/song link and let it download ,no pre-requsites needed unless you are downloading in mp3 format for which you will need ffmpeg to installed.Either ffmpeg has to be added to path or has to be copied to the directory where the exe file is.

In the later releases, ffmpeg will automatically be downloaded by the program.

If you get a Microsoft defender smartscreen popup like the one shown below do not panic it does NOT contain malware,its just that the exe isnt signed (requires money to buy a signing certificate) and thus windows thinks it is potentially dangerous.

image

If you have any problems,doubts,suggestion or any other queries you can reach me on discord at Rickyrorton#6693 or join the spotify downloader support server at https://discord.gg/8pTQAfAAbm. If you would like to support the project feel free to donate any amount to my paypal https://paypal.me/rickyrorton

Make sure you install all 3 exe provided with ffmpeg so that the program works as normal.How to install and add ffmpeg to path:https://windowsloop.com/install-ffmpeg-windows-10/#download-ffmpeg

FFMPEG Download links:

Windows: https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-essentials.7z (Inside the archive there will be a bin folder in which you will find 3 executables which will have to be installed) It is no longer required for windows as the program does this automatically for you

Linux:

Debian/Ubuntu:sudo apt-get ffmpeg

Arch:sudo pacman -S ffmpeg

Mac OS: https://evermeet.cx/ffmpeg/

The three required ffmpeg executables if you wish to download in mp3/wav/flac format

image

If empty command prompt windows like these open,DO NOT WORRY, they are just ffmpeg windows converting the songs into the required format image

If you are wondering if this has any malware here is the exe checked in virustotal: https://www.virustotal.com/gui/file/92eb314ed69573076d7b9137978d5a0412e6909557d3b133630148409ccaf6a4/detection

The 2 out of 69(nice) detections are false positives and the connections it makes are only to spotify(or their content distributors like akamai,fastly,verizon,etc).

=======================Only if you are going to use the .py file=======================

Make sure to install all required packages listed in the requirements.txt file by running the following command

pip install -r requirements.txt

1)You also require a client id and client secret for the program to work which you can obtain from https://developer.spotify.com/ by logging in and creating a new app from the dashboard which will then give you a client id and client secret which you paste in downloader.pyfile

image

image

2)Then run the gui.py file and paste the link of the playlist you want to download and click on the "Download songs" button and let it download and convert the songs which will take time depending on your cpu and number of songs in the playlist or if you are unwilling to use the .py file you can instead use the .exe file which does not require the libraries to beinstalled although ffmpeg has to installed and added to path for it to work

image

3)The songs will be downloaded to "Downloads" folder created within the directory itself where the py file exists

image

spotify-downloader's People

Contributors

adikpb avatar rickyrorton avatar seamusmullan avatar the-batfish 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotify-downloader's Issues

Song stops downloading out of the blue

the songs download up to around 20 to 30 songs then it stops both in the exe version and python, when closed and retried to download again, it skips the songs it already downloaded, then when it reaches a new song to download, it doesn't work again.

Based on the error logs, it seems the main issue is that some of the songs being processed do not have an "isrc" key in their "external_ids" dictionary.

Specifically, this line is causing errors:

Copy code

isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
When it tries to access song["external_ids"]["isrc"], it is raising a KeyError because some songs do not have an "isrc" entry.

Some solutions you could try:

Wrap that line in a try/except block to catch the KeyError and handle it gracefully:
Copy code

try:
isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
except KeyError:
# handle case where isrc is missing
isrc_code = None
Check if "isrc" is in external_ids before trying to access it:
Copy code

if "isrc" in song["external_ids"]:
isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
else:
# handle missing isrc
Pass over songs missing the isrc instead of erroring:
Copy code

if "isrc" not in song["external_ids"]:
continue # skip this song
The key thing is some songs don't have that metadata, so you need to handle that case to avoid errors.

Let me know if any part of the diagnosis or suggestions need more clarification!

Convetred files are m4a instead of mp3

In the past, converted files were of the .mp3 format, which works well with EA's NHL video games, which had a custom soundtrack feature on the PS3. However, the most recent update now has converted files be of the .m4a format, which is not supported by these games (teh fact that unconverted files are of the .mp4 format doesn't help). Is there anything that could be done about this?

Virus 3/69 detected malware is it something to worry about

the exe file provided in the repo should:
not be included in the repo itself, but as a release
not weigh 20MB, the author's excuse being "additional libraries"
not show up on virustotal, as shown here
not have a TCP call to a VPS owned by akamai on launch

it seems pretty suspicious, i would honestly use other downloaders on GitHub.

donation

Hey, could you may put a paypal donation link or something else where we can support your work?

Let the user choose what format to save the song as

In its current state, this downloader only allows the user to transcode lossy YouTube AAC/OPUS audio to a lossy mp3. Would it be possible to also allow downloading an m4a directly from YouTube without transcoding the audio? This would lead to higher quality downloads with a lower filesize.

WINERROR 2

Hello, When i choose the mp3 format. It's always says WINERROR 2. What can i do?

Format

Can you make an option that we can choose the output Letters. on mp3 its sounds so: Sia/Sean Paul

but i want, Sia, Sean Paul or Sia & Sean Paul. that we self can choose the delimiter?

latest release asks for an update

the latest release file v1.70 when run asks to update exe to the latest v1.70. it seems the version number was bumped in github but not in the file it self. it still thinks it's v1.68.

invalid syntax error in Windows

Hi, I'm getting a syntax error. Is this because of the python version ?
I'm using python 3.9.6
ffmpeg is installed.
Windows 10

Screenshot_30
Screenshot_31
Screenshot_32

Program fails to convert songs with symbols in the name

When the song has "/" in the name (AC/DC for example):

  • Couldnt convert song [Errno 2] No such file or directory : file path.mp3

When the song has "?" in the name:

  • Couldnt convert song [Errno 22] Invalid argument: file path.mp3

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.