rookie 0.1.6

Load cookie from your web browsers
Documentation

rookie

Load cookies from your web browsers

Install

cargo add rookie

Usage

use rookie::{self, Cookie};

fn main() {
    let domains = Some(vec!["google.com"]); // set to None to get all
    let cookies: Vec<Cookie> = rookie::chrome(domains).unwrap();
    println!("{:?}", cookies);
}

Bindings

There's Python bindings to rookie

pip install rookiepy

And the usage it similar to original

import rookiepy
cookies = rookiepy.firefox(["google.com"])
for cookie in cookies:
    print(cookie.domain, cookie.value)

Limitations

Chrome version 114 or later, when running on Windows, secures cookie files by locking them for enhanced security. To work with this, you have two options:

  • Use a command-line flag: Disable this feature by adding the following command-line flag when launching Chrome: chrome.exe --disable-features=LockProfileCookieDatabase.

  • Terminate Chrome processes if needed: Alternatively, you can terminate chrome.exe processes if you encounter any issues related to locked cookie files.