Answer the question
In order to leave comments, you need to log in
Why can the server return a 307 error when parsing a site in python?
Here is the error itself:
urllib.error.HTTPError: HTTP Error 307: The HTTP server returned a redirect error that would lead to an infinite loop.
Here is the function that receives html
def getHtml(url):
print(url)
response = urllib.request.urlopen(url)
return response.read()
Google gives advice to do something with cookies, but it doesn't work.
Can anyone help? there is a lot of content, show the customer tomorrow, only the working script will save )))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question