thewh1teagle / rookie

Load cookies from your web browsers
https://crates.io/crates/rookie
MIT License
204 stars 18 forks source link

when getting cookies domain var isn't included in the dict #3

Closed MisterChaneb closed 1 year ago

MisterChaneb commented 1 year ago

as the title says do please include the domain i'm using load function for some reason it's missing the domain variable.

thewh1teagle commented 1 year ago

Hi @MisterChaneb I already include the domain in the host attribute, so instead of using cookie.domain you should use cookie.host

from rookiepy import load, to_dict
cookies = load()
cookies = to_dict(cookies)
for cookie in cookies:
  print('host: ', cookie['host'])
MisterChaneb commented 1 year ago

Its not a matter of choice. Playwright requires it.

thewh1teagle commented 1 year ago

Show me example code you use to load it, I'm not sure what playwright expecting, so maybe it's not only the host issue but even after I include domain it won't work

MisterChaneb commented 1 year ago

No because i added the domain manually it worked? i tested without domain it's just a / does not work. with a domain i just manually added it and it worked

thewh1teagle commented 1 year ago

I changed it in latest version

MisterChaneb commented 1 year ago

Thanks a lot mate! I wouldn't mind if you want to have it be host as an argument option for other compatability reasons, otherwise great work.