Whenever I copy and paste the following into a web browser

Original URL

<http://accounts.spotify.com/authorize?client_id=XXX2d0ff4186b517daa4e1c577e4&redirect_uri=http:%2F%2Flocalhost:5000&scope=playlist-modify-public%20playlist-modify-private&response_type=token>

I get this for the final url

Final URL

http://localhost:5000/#access\_token=XXX-LQY7xCQXTqpmsfroChl5yeUoiIDmoBfybqc9psLE2WFwP2UNQ26nVuiLGQkIWA-4occeXbrScaO5mqmMHZpgDPjTcSEfN9VZCLKKyfE46FUsucmCetP9owY\_bRWoraZ8P2wwq0osZEMit0jmOrThvPTyKqp7O\_rAbwT1BUsLeB9ux7xdLnTreocpmtZl3wqMXz24B2mwRMEieb\_Dq2PUgIaK3zE7X-RvnzqQ&token\_type=Bearer&expires\_in=3600

My question is how to get the access\_token in the final url by using the original URL programmatically. Preferably in python. The original URL will be constant so I won't need to make any changes to the values of the parameters that I already declared

I have already tried

* Using python requests, and viewing the response.url.(both using POST and GET) But when I do it only shows the original url.
* Same concept using urllib
* Displaying it with .json, json(), .text, .headers, and pretty much all of the request functions available, but again it only makes references to the original url.