Can someone confirm that http redirects are not enabled by default for urllib.request.urlopen()
I'm trying to trigger urllib.request.urlopen(req)
. The response seen using my web browser Firefox (not python) is HTTP 302
which indicates a redirect and then Firefox automatically goes to the redirected page which returns HTTP 301 (permanently moved)
followed by HTTP 200 (OK)
.
I'm simulating what the browser is doing in python but the resulting web page is not as expected and I believe it's because the redirect is not being handled.