-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request cookies not updated with values from previous response #4717
Comments
Thanks for the detailed report. |
I ran similar code with |
Indeed, that seems to be the cause of the issue. The breaking point is 2.2.0, as @wRAR mentions, the included snippet works as expected in 2.1.0. |
I think this is what's happening, please take a look @Gallaecio @kmike @wRAR
The problem is in step 6. Could we solve this by removing cookies from redirect requests and letting the cookies middleware add the necessary ones back? That sounds too easy to be true. |
Description
[Description of the issue]
Steps to Reproduce
conda activate scrapy160
scrapy startproject test_login
cd test_login
scrapy genspider login quotes.toscrape.com/login
scrapy crawl login
conda activate scrapy230
scrapy crawl login
Expected behavior:
After login into http://quotes.toscrape.com/login the spider is redirected to http://quotes.toscrape.com/ and locates and prints the text of the log out link on the right top side of the page for version 1.6.0 and also 2.3.0. Refer to valid
[login] INFO: Logout
vs invalid[login] INFO: None
Actual behavior: Version 1.6.0. is able to locate log out link while version 2.3.0 can't
Reproduces how often: 100%
Output of the Version 1.6.0 - OK
Output of the Version 2.3.0 - NOT OK
Additional context
The text was updated successfully, but these errors were encountered: