kumono 0.45.5

Media ripper for coomer.su and kemono.su
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::cli::ARGS;
use reqwest::{ Client, ClientBuilder, Proxy };
use std::{ process, sync::LazyLock };

pub static CLIENT: LazyLock<Client> = LazyLock::new(|| {
    let mut client = ClientBuilder::new().connect_timeout(ARGS.connect_timeout);

    if let Some(proxy) = &ARGS.proxy {
        client = client.proxy(
            Proxy::all(proxy).unwrap_or_else(|err| {
                eprintln!("{err}");
                process::exit(1);
            })
        );
    }

    client.build().unwrap()
});