1

i wanted to pull a get request to a certain domain

lets say :

http://127.0.0.1/something.asp

but it redirecting to

http://127.0.0.1/default.asp

i followed this thread

Http Redirection code 3XX in python requests

from which i can understand what exactly is happening the request,headers (location),and redirection and all but there isnt any solution to force python requests to get that domain without a 301 http error response

for instance if i try to trigger that desired link that is http://127.0.0.1/something.asp in incognito browser it is being redirected to

http://127.0.0.1/default.asp

but without clicking on any subdomains from that default page if in the search bar if i give the same link again

http://127.0.0.1/something.asp 

this time without getting redirected im on that particular page

now my question is

if there is any way if thee site is redirecting(allow_redirect=True) and if the url isnt the same as the one i have given it should request again with cookie( or whatever that happend when i tried in incognito ) so that i get that desired page

John
  • 137
  • 2
  • 12

0 Answers0