fix(scraper): refactor host extraction in scrape_one function

This commit is contained in:
monosans
2026-02-24 08:06:15 +03:00
parent c1fe0e0618
commit e16aadf271
+7 -5
View File
@@ -171,10 +171,6 @@ async fn scrape_one(
#[cfg(feature = "tui")]
seen_protocols.insert(protocol);
let host_str = capture
.name("host")
.ok_or_eyre("failed to match \"host\" regex capture group")?
.as_str();
let port = capture
.name("port")
.ok_or_eyre("failed to match \"port\" regex capture group")?
@@ -205,7 +201,13 @@ async fn scrape_one(
} else {
new_proxies.insert(Proxy {
protocol,
host: host_str.into(),
host: capture
.name("host")
.ok_or_eyre(
"failed to match \"host\" regex capture group",
)?
.as_str()
.into(),
port,
username,
password,