thewh1teagle / rookie

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

Fix python function to_netscape #41

Closed mahlzahn closed 2 months ago

mahlzahn commented 4 months ago

Although this function may be removed or better written in the rust library, currently it was just broken and this PR fixes it:

See, for instance, https://docs.cyotek.com/cyowcopy/current/netscapecookieformat.html for documentation of the netscape cookie format. The resulting cookies were also cross-checked with the output of

from http.cookiejar import MozillaCookieJar

mcj = MozillaCookieJar('/tmp/cookies')
for c in rookiepy.to_cookiejar(rookiepy.chromium():
    mcj.set_cookie(c)
mcj.save()
thewh1teagle commented 2 months ago

Thanks!