diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-08 15:55:17 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-08 15:55:17 +0200 |
commit | 36b4c0b4fba57125791150c9df6740997d25d53c (patch) | |
tree | eb82c8e035e753ec5d739092d7a2020596e947d5 /src/client.rs | |
parent | 7caef8ad89c09c172af84d592a6547882b7d62d0 (diff) | |
download | weareearth-36b4c0b4fba57125791150c9df6740997d25d53c.tar weareearth-36b4c0b4fba57125791150c9df6740997d25d53c.tar.bz2 weareearth-36b4c0b4fba57125791150c9df6740997d25d53c.tar.zst |
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client.rs b/src/client.rs index 9c1b29a..8da86ce 100644 --- a/src/client.rs +++ b/src/client.rs @@ -27,10 +27,14 @@ impl GeClient { download_counter: AtomicUsize::new(0), cache_counter: AtomicUsize::new(0), par_limit: Semaphore::new(par_limit),cache, - client: Client::builder().default_headers(HeaderMap::from_iter([ - (HeaderName::from_static("user-agent"), HeaderValue::from_static("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36")), - (HeaderName::from_static("referer"), HeaderValue::from_static("https://earth.google.com/")) - ])).build().unwrap() + client: Client::builder() + .default_headers(HeaderMap::from_iter([ + (HeaderName::from_static("user-agent"), HeaderValue::from_static("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36")), + (HeaderName::from_static("referer"), HeaderValue::from_static("https://earth.google.com/")) + ])) + .http2_prior_knowledge() + .build() + .unwrap() }) } pub async fn download(&self, path: &str) -> Result<Bytes> { |