From 2b4e44bcdcbf32c32401164d1a090a0854499d35 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Tue, 7 Apr 2026 23:50:14 +0200 Subject: [PATCH] Use different load wait --- downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader.py b/downloader.py index 0d6a282..fa8089d 100644 --- a/downloader.py +++ b/downloader.py @@ -338,8 +338,8 @@ def download_all_invoices() -> list[Path]: if year != "all": year_select = page.locator("select#yearSelection, select#receiptDateId").first if year_select.count() > 0: - year_select.select_option(value=year) - page.wait_for_load_state("domcontentloaded") + with page.expect_navigation(wait_until="domcontentloaded"): + year_select.select_option(value=year) time.sleep(1) invoices = get_invoice_links(page)