diff options
| author | A Farzat <a@farzat.xyz> | 2026-03-09 05:54:43 +0300 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2026-03-09 05:54:43 +0300 |
| commit | 350ebb2bee997d6ef305a6e023d9dcc481afb5f8 (patch) | |
| tree | 2928630e8eae7c106cc6afec4bd7da70f477a8f4 | |
| parent | bf66adc6b16ac87ba5411d52c29850c91fcd3b7b (diff) | |
| download | oreilly-epub-350ebb2bee997d6ef305a6e023d9dcc481afb5f8.tar.gz oreilly-epub-350ebb2bee997d6ef305a6e023d9dcc481afb5f8.zip | |
Avoid useless jar clone and update User-Agent
| -rw-r--r-- | src/http_client.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http_client.rs b/src/http_client.rs index e8251d3..bc929bc 100644 --- a/src/http_client.rs +++ b/src/http_client.rs @@ -25,8 +25,8 @@ pub fn build_authenticated_client(cookies_path: &PathBuf) -> Result<Client> { // Build the client with the cookie provider and a standard User-Agent. let client = Client::builder() - .cookie_provider(Arc::clone(&jar)) - .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36") + .cookie_provider(jar) + .user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0") .build() .context("Failed to build the HTTP client")?; |
