Skip to content
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

Don't silently hit a URL for raw client cookie support #148

Closed
LegNeato opened this issue Jan 7, 2022 · 3 comments · Fixed by #257
Closed

Don't silently hit a URL for raw client cookie support #148

LegNeato opened this issue Jan 7, 2022 · 3 comments · Fixed by #257

Comments

@LegNeato
Copy link
Contributor

LegNeato commented Jan 7, 2022

It is unexpected that using the raw client loads a completely different URL first to get cookies:

self.goto(cookie_url.as_str()).await?;

We should probably create typestates and specific functions to drive them and not do this automatically. Or perhaps let the URL be configured.

@jonhoo
Copy link
Owner

jonhoo commented Jan 8, 2022

Yeah, it's really awkward, but as best as I can tell from the WebDriver standard, it's the only way to get cookies for a given domain. This is tracked for the spec in w3c/webdriver#1238.

@LegNeato
Copy link
Contributor Author

LegNeato commented Jan 8, 2022

My problem is the silent request is tripping bot detection, as this request + the "real" request happen too close together and the site sees me as a bot.

I'd like to at least be able to customize the url that is hit or skip this if I know I already have the cookies I want...would you take a PR to add that?

@jonhoo
Copy link
Owner

jonhoo commented Jan 9, 2022

Yeah, a PR seems like a good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants