From a697f5cb0c65a4104410cbfaf62092eb7b0287df Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 12 Jan 2024 17:12:07 -0300 Subject: [PATCH] no usar async channel --- scraper-rs/Cargo.lock | 59 ------------------------------------ scraper-rs/Cargo.toml | 3 -- scraper-rs/src/sites/coto.rs | 1 - 3 files changed, 63 deletions(-) diff --git a/scraper-rs/Cargo.lock b/scraper-rs/Cargo.lock index c057382..2890dbe 100644 --- a/scraper-rs/Cargo.lock +++ b/scraper-rs/Cargo.lock @@ -115,19 +115,6 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" -[[package]] -name = "async-channel" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" -dependencies = [ - "concurrent-queue", - "event-listener", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.5" @@ -286,15 +273,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" -[[package]] -name = "concurrent-queue" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -320,15 +298,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-utils" -version = "0.8.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] - [[package]] name = "deadpool" version = "0.10.0" @@ -391,27 +360,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "event-listener" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener", - "pin-project-lite", -] - [[package]] name = "fallible-iterator" version = "0.3.0" @@ -867,12 +815,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - [[package]] name = "parking_lot" version = "0.11.2" @@ -1184,7 +1126,6 @@ version = "0.1.0" dependencies = [ "again", "anyhow", - "async-channel", "clap", "deadpool", "deadpool-sqlite", diff --git a/scraper-rs/Cargo.toml b/scraper-rs/Cargo.toml index 3eb57bf..9de31e7 100644 --- a/scraper-rs/Cargo.toml +++ b/scraper-rs/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" [dependencies] again = "0.1.2" anyhow = "1.0.79" -async-channel = "2.1.1" clap = { version = "4.4.15", features = ["derive"] } deadpool = "0.10.0" deadpool-sqlite = "0.7.0" @@ -16,7 +15,6 @@ futures = "0.3.30" itertools = "0.12.0" nanoid = "0.4.0" rand = "0.8.5" -# lol_html = "1.2.0" reqwest = { version = "0.11.23", default-features = false, features = [ "rustls-tls", "gzip", @@ -24,7 +22,6 @@ reqwest = { version = "0.11.23", default-features = false, features = [ "socks", ] } rusqlite = "0.30.0" -# scraper = "0.18.1" serde = { version = "1.0.193", features = ["derive"] } serde_json = "1.0.109" simple-error = "0.3.0" diff --git a/scraper-rs/src/sites/coto.rs b/scraper-rs/src/sites/coto.rs index 7bfcb8a..f6a9e04 100644 --- a/scraper-rs/src/sites/coto.rs +++ b/scraper-rs/src/sites/coto.rs @@ -76,7 +76,6 @@ pub fn parse(url: String, dom: &tl::VDom) -> Result } pub async fn get_urls() -> anyhow::Result> { - // let (sender, recv) = async_channel::unbounded(); let client = build_client(); let initial = Url::parse("https://www.cotodigital3.com.ar/sitios/cdigi/browse?Nf=product.endDate%7CGTEQ+1.7032032E12%7C%7Cproduct.startDate%7CLTEQ+1.7032032E12&Nr=AND%28product.sDisp_200%3A1004%2Cproduct.language%3Aespa%C3%B1ol%2COR%28product.siteId%3ACotoDigital%29%29")?;