Skip to content

Commit

Permalink
FIX extract sell directly from ad page
Browse files Browse the repository at this point in the history
Web element with id `j-buy-now` does not exist anymore. Fetch the `payment-buttons-sidebar` instead and check the text for `Direkt kaufen`
  • Loading branch information
provinzio authored and sebthom committed May 30, 2024
1 parent ba73ebb commit b30867c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kleinanzeigen_bot/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b30867c

Please sign in to comment.