[[package]]
name = "hashbrown"
-version = "0.8.2"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25"
-dependencies = [
- "autocfg 1.0.1",
-]
+checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7"
[[package]]
name = "hermit-abi"
[[package]]
name = "indexmap"
-version = "1.5.2"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e47a3566dd4fd4eec714ae6ceabdee0caec795be835c223d92c2d40f1e8cf1c"
+checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
dependencies = [
"autocfg 1.0.1",
"hashbrown",
[[package]]
name = "syn"
-version = "1.0.39"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9"
+checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350"
dependencies = [
"proc-macro2",
"quote",
};
let selector = Selector::parse("div.productGridElement > h2 > a:nth-child(1)").unwrap();
+ let url = format!("https://www.steg-electronics.ch/fr/search?suche={}", to_find);
+
+ let client = reqwest::blocking::Client::new();
loop {
- let url = format!("https://www.steg-electronics.ch/fr/search?suche={}", to_find);
println!("Request: {}", url);
- let resp = reqwest::blocking::get(&url)?;
+ let resp = client.get(&url).send()?;
if resp.status().is_success() {
let html = resp.text()?;