From 2c7d165b6eb7823ef7c71ed901fff9f66eb41921 Mon Sep 17 00:00:00 2001 From: Tobias Faber <29856726+faberto@users.noreply.github.com> Date: Sun, 31 Mar 2024 22:27:24 +0200 Subject: [PATCH] Fix download on given IDs list --- src/kleinanzeigen_bot/extract.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kleinanzeigen_bot/extract.py b/src/kleinanzeigen_bot/extract.py index 4b9d80c..663fa9a 100644 --- a/src/kleinanzeigen_bot/extract.py +++ b/src/kleinanzeigen_bot/extract.py @@ -183,6 +183,8 @@ async def naviagte_to_ad_page(self, id_or_url:int | str) -> bool: :return: whether the navigation to the ad page was successful """ if is_integer(id_or_url): + # navigate to start page, otherwise page can be None! + await self.web_open('https://www.kleinanzeigen.de/') # enter the ad ID into the search bar await self.web_input(By.ID, "site-search-query", id_or_url) # navigate to ad page and wait