Cookies are not being imported properly? #2739
-
|
Hello, I do import my cookies from selenium chrome and at the end they looks like this: Cookies exported after emulation{'_ga_NJ8BH4ETQS': 'GS1.1.1686190607.1.1.1686190608.0.0.0', 'PHPSESSID': '1mmh22v3cv3emq03mfnmp9at7c', '_gat_gtag_UA_146586338_1': '1', '__cf_bm': 'd9.lRGrcxe8773zqF2kEIqkHjPBypcLAXW9IUbZw2xs-1686190608-0-AZYm7BpJjSQzc3vtweTrL3ZShFZxdzsuxNjLbdy16F/prX4DBvmzfV1D1saoGLss3Q==', '_gid': 'GA1.2.400962821.1686190607', '_ga': 'GA1.1.1668825872.1686190607', 'cf_clearance': 'swD.Mvx4O5.TO3.WhMUxQRY9zgaWMaV5U8.Q18fSXaE-1686190600-0-250'} then I use that output in httpx.AsyncClient(..., cookies=browser_cookies, ...) and only 1 cookie is present in client and I am completely clueless why it is like that. Debug viewhttps://i.imgur.com/STBZEEZ.pngI have tried setting up cookies for AsyncClient only, build_request method only and on both in the same time and no matter if I use these cookies as argument for things above or I do use httpx.Cookie and use set method for each cookie I always see only PHPSESSID in requests and all of them fails due to being stuck on Cloudflare page, because other cookies are not set. Have anyone face issue like this or can point me right direction to solve that mess? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hey @OpsecGuy, I've transferred this to a discussion as we like to reserve the bug tracker for actionable work. I'd also recommend searching these discussions as there are some about cookies that may be helpful. Would you mind providing a reproducible example? |
Beta Was this translation helpful? Give feedback.
-
|
Hello, Cookies and setting them up is working properly. There is no issue on day 9 June :) |
Beta Was this translation helpful? Give feedback.
Hello,
It's a shame for me and I am very sorry for issuing false bug report. Issue was caused by 1 of my components in code which override cookie header that's why only 1 was present instead of all of them which were taken from browser emulation process.
It's a great lesson for me to expect unexpected and don't code when I'm tired...
Cookies and setting them up is working properly. There is no issue on day 9 June :)