-
Notifications
You must be signed in to change notification settings - Fork 772
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
Is there an easy way to set cookie? #754
Comments
The example illustrates many things, that's why it looks "complicated":
The source code in part 1 is what you need. BTW, I think it's a bad idea to wait like this:
|
Thanks! |
but the document.cookie is null |
@hzmnet Please provide a minimal demo to show what's wrong. |
@ZekeLu please check to run the code document.cookie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw the example here: https://github.com/chromedp/examples/blob/master/cookie/main.go , but it looks a little too complicated. For example, I don't know what a cookieServer is used for.
Moreover, the
setcookies()
function seems to do something like "read the returned values". In my case, I already know what cookie I need to set as follows, including cookie name, value, domain and all other properties (by logging in the site manually). I just need to set these static cookie info into ChromeDP.I want to have a simple API like:
Is it possible?
The text was updated successfully, but these errors were encountered: