In this post, we will see how to resolve Python requests stop redirects does not work
Question:
I want to access the content of a web page, but I’m being redirected to another page even though I’ve set allow_redirects to False in my requests call. Here’s an example code snippet:Best Answer:
You’d have to log in to get to the original SO question becauseanonymous users get automatically redirected to the duplicate target when trying to access questions closed as duplicates with no answers
The relevant Meta Post, which is a duplicate itself of this question.
You can replicate this switching to Private Mode in your browser and then opening this link:
Program is about space utilisation. i am getting error : 72G value too great for base (error token is “72”)
You should get redirected to Convert between byte count and “human-readable” string
EDIT:
You can turn off this behaviour and get to the original post with
rquests
by appending the URL with:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review