glomatico / votify

A Python CLI app for downloading songs/podcasts from Spotify.
MIT License
192 stars 11 forks source link

error 403 #24

Closed abolfazlMKazemi closed 6 days ago

abolfazlMKazemi commented 1 week ago

I run this command and it downloads:

bash Copy code votify --audio-quality aac-high --cookies-path cookies.txt --wvd-path device.wvd "https://open.spotify.com/track/1BxfuPKGuaTgP7aM0Bbdwr" But when I run:

bash Copy code votify --audio-quality vorbis-high --cookies-path cookies.txt --wvd-path device.wvd "https://open.spotify.com/track/1BxfuPKGuaTgP7aM0Bbdwr" It gives error 403.

Can someone check to see if they have the same problem as me, or if anyone has a solution, please help me.

ankitpaudel20 commented 6 days ago

I am also getting the same issue. This is the full traceback if that helps:

Traceback (most recent call last):
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/utils.py", line 8, in check_response
    response.raise_for_status()
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://gew4-spclient.spotify.com/playplay/v1/key/<key>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/cli.py", line 597, in main
    downloader_song.download(
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/downloader_song.py", line 137, in download
    self._download(*args, **kwargs)
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/downloader_song.py", line 213, in _download
    decryption_key = self.get_decryption_key(stream_info)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/downloader_audio.py", line 98, in get_decryption_key
    decryption_key = self.downloader.get_playplay_decryption_key(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/downloader.py", line 381, in get_playplay_decryption_key
    playplay_license_response_bytes = self.spotify_api.get_playplay_license(
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/spotify_api.py", line 287, in get_playplay_license
    check_response(response)
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/utils.py", line 10, in check_response
    _raise_response_exception(response)
  File "/home/smloy/.pyenv/versions/3.12.5/envs/fprint/lib/python3.12/site-packages/votify/utils.py", line 14, in _raise_response_exception
    raise Exception(
Exception: Request failed with status code 403:
glomatico commented 6 days ago

Dup of #5