From b30867ca4835cf680e977fbd15e28803c026fbfc Mon Sep 17 00:00:00 2001 From: Jeppy Date: Thu, 30 May 2024 18:02:01 +0200 Subject: [PATCH] FIX extract sell directly from ad page Web element with id `j-buy-now` does not exist anymore. Fetch the `payment-buttons-sidebar` instead and check the text for `Direkt kaufen` --- src/kleinanzeigen_bot/extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kleinanzeigen_bot/extract.py b/src/kleinanzeigen_bot/extract.py index 28342c7..eea56b7 100644 --- a/src/kleinanzeigen_bot/extract.py +++ b/src/kleinanzeigen_bot/extract.py @@ -373,7 +373,7 @@ async def _extract_sell_directly_from_ad_page(self) -> bool | None: :return: a boolean indicating whether the sell directly option is active (optional) """ try: - buy_now_is_active:bool = (await self.web_text(By.ID, 'j-buy-now')) == "Direkt kaufen" + buy_now_is_active:bool = 'Direkt kaufen' in (await self.web_text(By.ID, 'payment-buttons-sidebar')) return buy_now_is_active except TimeoutError: return None