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

View File

@@ -371,52 +371,6 @@ async fn main() -> anyhow::Result<()> {
let url = "https://www.finanzen.net/termine/wirtschaftsdaten/";
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
let start_date = "2024-01-01";
let end_date = "2025-01-01";
@@ -468,25 +422,6 @@ async fn main() -> anyhow::Result<()> {
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
let rows = client.find_all(Locator::Css(
"#TeletraderForm table.table tbody tr"