Code Monkey home page Code Monkey logo

spotifile's People

Contributors

leyuskckiran1510 avatar michael-k-stein 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

spotifile's Issues

Full download exception: Expecting value: line 1 column 1 (char 0)

I exported cookies:

export SP_DC="xxx"
export SP_KEY="xxx"
python main.py

Then firefox pop-up, I paste a playlist, then click download button, I get in the web UI:

Full download exception: Expecting value: line 1 column 1 (char 0)

In cli, between HTTP logs, I have

Access token is anon:  False
  • Firefox 111.0.1 (64-bit)
  • Python 3.10.6
  • Requirements installed

Web GUI: Errors

The Web GUI is up and running with a confirmed access token generated.

Error 1

When trying to download songs, artists, playlists, etc., via direct URL, this error shows up on the bottom of the web GUI:

2023-04-07 09:14:09 | Recieved scrape command on identifier: https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT, recursive=False, recursive_artist=False, recursive_album=False

2023-04-07 09:14:09 | Thread<123145570799616> | Exception: Expecting value: line 1 column 1 (char 0)

2023-04-07 09:14:09 | Thread<123145570799616> | Processed 1 tracks

2023-04-07 09:14:09 | Comletely done scraping identifier: https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT!

At this point, there was no track downloaded (not in save folder nor temp folder).

Error 2

When trying to download songs by category, this error shows up in the web GUI window:

Access token is anon: False
127.0.0.1 - - [07/Apr/2023 09:18:37] "GET /info/console/?offset=52 HTTP/1.1" 200 -
127.0.0.1 - - [07/Apr/2023 09:18:37] "POST /actions/download/categories HTTP/1.1" 500 -
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 2551, in call
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 2531, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sasquelch/Documents/SpotiFile/webgui.py", line 36, in actions_download_categories
download_all_categories_playlists(download_meta_data_only=False, query=query)
File "/Users/sasquelch/Documents/SpotiFile/spotify_mass_download.py", line 158, in download_all_categories_playlists
client.refresh_tokens()
File "/Users/sasquelch/Documents/SpotiFile/spotify_client.py", line 39, in refresh_tokens
self.get_tokens(self.dc, self.key)
File "/Users/sasquelch/Documents/SpotiFile/spotify_client.py", line 33, in get_tokens
self._client_token = self.get_client_token(self._client_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/sasquelch/Documents/SpotiFile/spotify_client.py", line 60, in get_client_token
return response.json()['granted_token']['token']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
127.0.0.1 - - [07/Apr/2023 09:18:37] "GET /actions/download/categories?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 304 -
127.0.0.1 - - [07/Apr/2023 09:18:37] "GET /actions/download/categories?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 304 -
127.0.0.1 - - [07/Apr/2023 09:18:37] "GET /actions/download/categories?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 304 -

  • Firefox 111.0.1 (64-bit)
  • Python 3.11.3
  • Requirements installed

THIS USER IS PREMIUM!

pip3 install -r requirements.txt
python3 main.py

Traceback (most recent call last):
  File "/Users/Downloads/SpotiFile/main.py", line 2, in <module>
    from webgui import app
  File "/Users/Downloads/SpotiFile/webgui.py", line 4, in <module>
    from spotify_mass_download import full_download, console, download_all_categories_playlists
  File "/Users/Downloads/SpotiFile/spotify_mass_download.py", line 15, in <module>
    client.get_me()
  File "/Users/Downloads/SpotiFile/spotify_client.py", line 92, in get_me
    raise SpotifyClientException('THIS USER IS PREMIUM!')
exceptions.SpotifyClientException: THIS USER IS PREMIUM!

Cannot import name 'urlencode' from 'urllib'

I'm pretty sure I'm just doing something wrong but when I run main.py it gives me an import error of 'cannot import name 'urlencode' from 'urllib'. I'm using python 3.10, and all the dependencies noted in the requirements file are installed.

pip installing requirements

Using the command to install requirements (pip install -r ./requirements.txt or pip install -r ./requirements) results in the error:

ERROR: Could not find a version that satisfies the requirement rich (from py-deezer->-r ./requirements.txt (line 2)) (from versions: none)
ERROR: No matching distribution found for rich (from py-deezer->-r ./requirements.txt (line 2))

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.