Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Authentication failed caused by 302 redirect #48

Closed
superhermes opened this issue Feb 15, 2023 · 4 comments
Closed

Authentication failed caused by 302 redirect #48

superhermes opened this issue Feb 15, 2023 · 4 comments

Comments

@superhermes
Copy link

superhermes commented Feb 15, 2023

   for cookie in cookie_file:

        self.session.cookies.set(cookie["name"], cookie["value"])

    # url = "https://www.bing.com/turing/conversation/create"

    url="https://cn.bing.com/turing/conversation/create"

    # Send GET request

    response = self.session.get(
        url,
        timeout_seconds=30,
        headers=headers,
    )

Get the url https://www.bing.com/turing/conversation/create will get a 302 response which redirect to new url,The Authentication fail.
change the new url works.Maybe it’s about the region.

@acheong08
Copy link
Owner

I might be able to fix this with a allow redirect flag. Do you mind hanging around to test it?

@acheong08
Copy link
Owner

@acheong08
Copy link
Owner

If this doesn't work, it means that you can't use this in China

@superhermes
Copy link
Author

The new version(bf93dd7)is work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants