updated ignore config

This commit is contained in:
2025-11-16 17:25:49 +01:00
parent a91447cace
commit 67ecc1e89a
6 changed files with 2 additions and 17417 deletions

3
.gitignore vendored
View File

@@ -22,4 +22,5 @@ target/
/target /target
/chromedriver_win32/* /chromedriver-win64/*
/economic_events.json

View File

@@ -1,27 +0,0 @@
// Copyright 2015 The Chromium Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -371,52 +371,6 @@ async fn main() -> anyhow::Result<()> {
let url = "https://www.finanzen.net/termine/wirtschaftsdaten/"; let url = "https://www.finanzen.net/termine/wirtschaftsdaten/";
client.goto(url).await?; client.goto(url).await?;
/* let _ = client.execute(
r#"(() => {
const overlay = document.querySelector('iframe[title="Contentpass First Layer"]');
if (overlay) {
overlay.style.display = "none";
overlay.style.visibility = "hidden";
return true;
}
return false;
})()"#,
vec![]
).await;
for _ in 0..5 {
// Check if the iframe exists
let overlay_hidden: bool = client.execute(
r#"(() => {
const iframe = document.querySelector('iframe[title="Contentpass First Layer"]');
if (!iframe) return true; // already gone
// Try clicking button inside iframe via contentWindow
try {
const btn = iframe.contentWindow.document.querySelector('button');
if(btn) btn.click();
} catch(e) {}
// Hide the iframe itself
iframe.style.display = 'none';
iframe.style.visibility = 'hidden';
return false; // still hidden
})()"#,
vec![]
).await.ok()
.and_then(|v| v.as_bool())
.unwrap_or(false);
if overlay_hidden {
println!("Overlay hidden");
break;
}
sleep(Duration::from_millis(500)).await;
}
client.enter_parent_frame().await.ok();*/
// Set start and end dates // Set start and end dates
let start_date = "2024-01-01"; let start_date = "2024-01-01";
let end_date = "2025-01-01"; let end_date = "2025-01-01";
@@ -468,25 +422,6 @@ async fn main() -> anyhow::Result<()> {
println!("Date not set correctly"); println!("Date not set correctly");
} }
// Hide any reappearing overlay
/*dismiss_overlays(&client).await?;
// Wait for the tab to appear and click it
if let Ok(_) = client.find(Locator::Css(
"#TeletraderForm > article.page-content__item.page-content__item--space.margin-bottom-1\\.00.margin-top-1\\.00-md > div.tab-region > nav > div > div > div.tab__item.tab__item--active"
)).await {
// Example: click "Hohe Relevanz" tab
if let Ok(tab) = client.find(Locator::Css(r#"div[data-sg-tab-item="teletrader-dates-three-stars"]"#)).await {
tab.click().await?;
}
println!("Importance tab clicked");
} else {
println!("Importance tab not found");
}
// Wait a bit for the table to load
sleep(Duration::from_secs(1)).await;*/
// Find all table rows // Find all table rows
let rows = client.find_all(Locator::Css( let rows = client.find_all(Locator::Css(
"#TeletraderForm table.table tbody tr" "#TeletraderForm table.table tbody tr"