Replies: 5 comments 2 replies
|
Also this cookie is not only in cookie for one time, it's also can be found in request headers. |
|
The available cookie methods for CDP Mode are: sb.cdp.get_all_cookies(*args, **kwargs)
sb.cdp.set_all_cookies(*args, **kwargs)
sb.cdp.save_cookies(*args, **kwargs)
sb.cdp.load_cookies(*args, **kwargs)
sb.cdp.clear_cookies()
sb.cdp.get_cookie_string()There's a CDP Mode cookie example here: Do browser navigation after activating CDP Mode, as the URL changes on activation. |
|
The best approach we found is to just Can get all the cookies, even the cookies which can be accessed only on specified path. |
|
I can't access cookies after the Chrome update. from seleniumbase import sb_cdp def get_cf_clearance_cookie(sb): url = "https://gitlab.com/users/sign_in" |
|
How should I use the cf_clreance cookie code? and this gives error pip install sb-cdp==1.3.4 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, SB Community and Michael
My current goal is to get the cookie in browser, which has a "path" field. Which doesn't allow me to get that cookie if I'm not on the corresponding path (e.g. v2/auth) I've tried a lot of approaches, but redirecting to that path can't help me, because this exact cookie is deleted when I redirect to any page. (Important)
The only approach that can work is to enable CDP mode, (which I would like not to do, but it seems that there is no solutions).
I'm activating CDP In big application
And at some point to get that cookie I need to activate CDP mode, it will be called but from async function but if I call it, it says that there is already another event loop. Is there any solution to this problem? Or maybe you can suggest me a way how can I extract that cookie from chromium.
Also will it even work if I enable CDP mode while running the code, if activate_cdp_mode() opens a new instance of browser?
All reactions