From ac740c76b6db90fc6932274fa84766e23cba3ed2 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 10 Jul 2024 08:43:51 +0200 Subject: [PATCH] Accept minimal tracking for nzz login. --- Cargo.lock | 4 ++-- cookie/Cargo.toml | 2 +- cookie/src/lib.rs | 10 ++++++++++ download/Cargo.toml | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48c8eb6..39b1c70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -910,7 +910,7 @@ dependencies = [ [[package]] name = "nzz-cookie" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", "clap", @@ -921,7 +921,7 @@ dependencies = [ [[package]] name = "nzz-download" -version = "0.1.0" +version = "0.2.0" dependencies = [ "anyhow", "clap", diff --git a/cookie/Cargo.toml b/cookie/Cargo.toml index edded6b..3a979e1 100644 --- a/cookie/Cargo.toml +++ b/cookie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nzz-cookie" -version = "0.1.0" +version = "0.2.0" edition = "2021" license = { workspace = true } authors = { workspace = true } diff --git a/cookie/src/lib.rs b/cookie/src/lib.rs index 974d374..2105f18 100644 --- a/cookie/src/lib.rs +++ b/cookie/src/lib.rs @@ -30,6 +30,16 @@ pub async fn run(args: Config, pw: &str) -> Result<()> { .await?; client.goto(LOGIN_URL).await?; + + sleep(Duration::from_millis(500)).await; + let fu_open_button: Element = element_from_css(&client, ".cmpboxbtncustom").await?; + fu_open_button.click().await?; + + let fu_button: Element = element_from_css(&client, ".cmpboxbtn.cmpboxbtnyes.cmpboxbtnyescustomchoices.cmptxt_btn_save").await?; + sleep(Duration::from_millis(500)).await; + fu_button.click().await?; + + let login_button: Element = element_from_css(&client, ".fup-menu-login-container").await?; sleep(Duration::from_millis(500)).await; login_button.click().await?; diff --git a/download/Cargo.toml b/download/Cargo.toml index 2982116..43e7d32 100644 --- a/download/Cargo.toml +++ b/download/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nzz-download" -version = "0.1.0" +version = "0.2.0" edition = "2021" license = { workspace = true } authors = { workspace = true }