openai-cookbook icon indicating copy to clipboard operation
openai-cookbook copied to clipboard

Website Q & A bot crawler TooManyRedirects

Open Arnasltlt opened this issue 1 year ago • 0 comments

I am not too qualified to assess this, but in the Q&A crawler example https://github.com/openai/openai-cookbook/tree/main/solutions/web_crawl_Q%26A I was encountering this error: requests.exceptions.TooManyRedirects: Exceeded 30 redirects

ChatGPT solved it for me by including this in the crawler function:

            except requests.exceptions.TooManyRedirects:
                print("Too many redirects for " + url + ", moving on to next link.")
                continue

Maybe good to include it

Arnasltlt avatar Feb 04 '23 17:02 Arnasltlt