From bb47a98ea62ce651dd8cc7f4392a244cdb40afda Mon Sep 17 00:00:00 2001 From: Carlos Iriarte Date: Sun, 24 Jan 2021 19:21:02 -0800 Subject: [PATCH] fix: remove unnecessary headers --- src/congress/senators.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/congress/senators.rs b/src/congress/senators.rs index d5bda62..9a20799 100644 --- a/src/congress/senators.rs +++ b/src/congress/senators.rs @@ -12,6 +12,7 @@ use reqwest::Url; use super::legislatures::Legislature; #[derive(Serialize, Deserialize, Debug)] +#[serde(untagged)] enum CongressMember { ByState { name: String, @@ -54,7 +55,6 @@ async fn process(legislature: &str) -> std::result::Result<(), Error> { } fn extract(l: &Legislature) -> std::result::Result, Error> { - println!("{:?}", l.link); let url = Url::parse(&l.link.as_ref().unwrap())?; let mut res = reqwest::blocking::get(url)?; @@ -98,7 +98,6 @@ fn extract(l: &Legislature) -> std::result::Result, Error> { let h3_list = document.select("h3").unwrap(); for h3 in h3_list.filter_map(|h| super::with_title(h, "lista nacional".to_string())) { let table = h3.as_node().next_sibling().unwrap().next_sibling().unwrap(); - println!(" {:?}", h3.as_node().text_contents()); for tr in table.select("tr:not(:first-child)").unwrap() { let cols: Vec> = tr.as_node() .select("td") -- 2.45.2