Matthew Ransley 0437b3fccf Update README.md
2023-07-04 20:10:17 +01:00
2022-12-20 11:29:32 -05:00
2023-01-05 02:25:20 +01:00
2023-07-04 20:02:09 +01:00
2023-01-05 01:40:32 +01:00
2023-01-05 01:40:32 +01:00
2023-01-05 01:40:32 +01:00
2023-01-05 01:40:32 +01:00
2022-11-16 10:44:55 -05:00
2023-01-05 01:40:32 +01:00
2023-01-05 02:25:20 +01:00
2016-12-13 15:47:28 -08:00
2023-07-04 20:10:17 +01:00

reqwest-impersonate

A fork of reqwest-impersonate, designed to provide more functionality and stability

Notice: This crate depends on patched dependencies. To use it, please add the following to your Cargo.toml.

[patch.crates-io]
hyper = { git = "https://github.com/4JX/hyper.git", branch = "v0.14.18-patched" }
h2 = { git = "https://github.com/4JX/h2.git", branch = "imp" }

These patches were made specifically for reqwest-impersonate to work, but I would appreciate if someone took the time to PR more "proper" versions to the parent projects.

Example

Cargo.toml

reqwest-impersonate = { git = "https://github.com/epicmatthew23/reqwest-impersonate.git", default-features = false, features = [
    "chrome",
    "blocking",
] }

main.rs

use reqwest_impersonate::browser::ChromeVersion;

fn main() {
    // Build a client to mimic Chrome 104
    let client = reqwest_impersonate::blocking::Client::builder()
        .chrome_builder(ChromeVersion::V104)
        .build()
        .unwrap();

    // Use the API you're already familiar with
    match client.get("https://yoururl.com").send() {
        Ok(res) => {
            println!("{:?}", res.text().unwrap());
        }
        Err(err) => {
            dbg!(err);
        }
    };
}
Description
No description provided
Readme 2 MiB
Languages
Rust 99.6%
Nix 0.4%