invicnaper / spotify-dl

a script that allows you to download spotify songs or playlists , written in python
322 stars 40 forks source link

An HTTP error occurred #9

Open ZiTAL opened 7 years ago

ZiTAL commented 7 years ago
spotify-dl.py --user zital --password 123456 --track 4N9KYHdndXJUgYuQOuWmoR --dl youtube
@ spotify-dl.py version 0.0.1
@ author : Naper
@ Designed for OSx/linux

[+]  getting track name
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    77  100    77    0     0    332      0 --:--:-- --:--:-- --:--:--   333
[+] An HTTP error occurred
youtube-dl --version
2017.07.02
root@debian-sony-vaio:/home/zital# pip show beautifulsoup4
---
Name: beautifulsoup4
Version: 4.6.0
Location: /usr/local/lib/python2.7/dist-packages
Requires:
invicnaper commented 7 years ago

Please refer to this https://github.com/invicnaper/spotify-dl/issues/2

psamim commented 7 years ago

I have the same error, on Archlinux,

iwatchallit commented 7 years ago

is it not working anymore ?

invicnaper commented 7 years ago

I'm checking out the issue

invicnaper commented 7 years ago

This is a spotify api bug, the new version of the spotify api require acces_token for all requests, the patch https://github.com/invicnaper/spotify-dl/commit/c360b7e89b6c71cf271035e62b42777fa1f6022d add new features for generating access_token. Please refer to https://github.com/invicnaper/spotify-dl#spotify-api

Villelmo commented 7 years ago

Hi @invicnaper i execute the following command:

./spotify-dl --gen_url

and get the following

https://accounts.spotify.com/authorize?client_id=&response_type=token&redirect_uri=

but i don't having success for download music

 ./spotify-dl.py --track 6cKJ7UaWtEYpbucvRqHuGt --dl youtube --access_token https://accounts.spotify.com/authorize?client_id=&response_type=token&redirect_uri=

@ author : Naper
@ Designed for OSx/linux

[+]  getting track name
[+] can't found song name
[+] Invalid access token
[+] An HTTP error occurred

:( Help me!!!

ZiTAL commented 7 years ago

@Villelmo I recommend to you to create an app in: https://developer.spotify.com/ and get the access token manually, the access token is not and URL, its a string with letters and numbers.

Good luck

Villelmo commented 7 years ago

Thanks @ZiTAL. Ok 👍

ZiTAL commented 7 years ago

To get the access token: 1.- Create an APP in: https://developer.spotify.com/ 2.- get the CLIENT_ID and set an "Redirect URIs" use whatever: http://example.com 3.- go to url: https://accounts.spotify.com/authorize?client_id=YOUR_CLIENT_ID&response_type=token&redirect_uri=http://example.com 4.- push OK button 5.- You will redirected to an url like: http://example.com/#access_token=123456780106MmhxsFzKCk2FHrrjoycbOwUPmWjg1i6JRwaaXxVbVM7O1K_ymBD30cjeyQPVLM12h3KoFU6sn&token_type=Bearer&expires_in=3600 6.- your token is access_token param, in this case: 123456780106MmhxsFzKCk2FHrrjoycbOwUPmWjg1i6JRwaaXxVbVM7O1K_ymBD30cjeyQPVLM12h3KoFU6sn 7.- use it like: ./spotify-dl.py --access_token 123456780106MmhxsFzKCk2FHrrjoycbOwUPmWjg1i6JRwaaXxVbVM7O1K_ymBD30cjeyQPVLM12h3KoFU6sn --track 1mVsLVf3VEClH9SPiYNnaX --dl youtube