Closed 44ron closed 3 months ago
Does running the script without a cookie string work normally? (using the default edge login cookies)
Does running the script without a cookie string work normally? (using the default edge login cookies)
No, I'm on mac and dont use edge, I couldn't get it to work with chromium or firefox. I also tried giving cookies.sqlite path with the cookie_path parameter and that didn't work either. So i just copied the sp_t value from the .sqlite file.. Its not an expired cookie either, should work until 2024 december. Edit: As far as Ive seen it the first authorization goes through and then the timeout triggers after that.. increasing timeout to 20secs didn't help either.
I'll test this further on my mac tomorrow. In the meanwhile, try logging in to spotify on an incognito tab and copying every cookie created by spotify into the cookie string, instead of just the sp_t value - maybe that would fix it?
Thank you, adding the sp_key and sp_dc cookies seems to have done the trick. But now I get a bad request error:
2024-04-04 23:23:35,535 - DEBUG - websockets.client - < TEXT '{"headers":{"Spotify-Connection-Id":"XXXXXXXXXXX"}' [526 bytes] 2024-04-04 23:23:35,773 - DEBUG - urllib3.connectionpool - Starting new HTTPS connection (1): guc-spclient.spotify.com:443 2024-04-04 23:23:35,987 - DEBUG - urllib3.connectionpool - https://guc-spclient.spotify.com:443 "POST /track-playback/v1/devices HTTP/1.1" 400 None 2024-04-04 23:23:36,017 - DEBUG - urllib3.connectionpool - Starting new HTTPS connection (1): api.spotify.com:443 2024-04-04 23:23:36,132 - DEBUG - urllib3.connectionpool - https://api.spotify.com:443 "PUT /v1/me/notifications/user?connection_id=XXXXXXXXXXXXXXXXXXXXX= HTTP/1.1" 410 0
I can't replicate this, so it could be an account-related issue, so maybe try with another account I guess?
Another thing that you could try is changing every request url from guc-spclient.spotify.com
to guc3-spclient.spotify.com
, but I don't know if this would change anything.
This is pretty late, but I believe copying all of the cookies generated by Spotify should hopefully fix this error, as is what occurred when I was testing. I don't know what cookies are / are not required, but copying all/most of them should work.
Im trying to connect using a cookie string and run a skip command. examples.py:
this is my debug output: