Closed SneakerSociety closed 4 years ago
Have similar errors when I work with some sites.
I too experience this issue. In requests made with same session, cookies are lost, and the requests are treated as separate new requests. Hope will be fixed soon
This needs more details, e.g. cookies being lost. It might be due to cookies not getting parsed/recognized in the first place (see https://github.com/aio-libs/aiohttp/issues/2502#issuecomment-488864745).
Close, people don't provide required info
Long story short
I've been trying to write a code that has two requests. First is a post and second is a get request on the redirect from the post request. I'm getting a 404 error on the get request. It seems like cookies aren't saving between the two requests or two separate sessions are created.
Expected behaviour
I expected two requests to be in the same session.
Actual behaviour
I was trying to make a script that would sign up for an account on cncpts.com. When you try and sign up more than once on an IP it redirects you to a link cncpts.com/challenge which is where you solve a captcha. Anyways, if you try to go to /challenge without making an account first you get a 404 error. So I have two requests, first a post request to fill out the sign up information and then a get request on /challenge so I can parse it for a token I need. I was assuming that with aiohttp sessions are saved like requests but whenever I run the script I get a 404 error as if the requests are being sent with different cookies/sessions.
I've been asking around and no one seems to know. You guys are my last hope. I was told it might be a bug or something, not 100% sure.
Your environment
Current aiohttp version, Windows Client
Steps to reproduce