mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
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`
This commit is contained in:
committed by
Sebastian Thomschke
parent
ba73ebb393
commit
b30867ca48
@@ -373,7 +373,7 @@ class AdExtractor(WebScrapingMixin):
|
|||||||
:return: a boolean indicating whether the sell directly option is active (optional)
|
:return: a boolean indicating whether the sell directly option is active (optional)
|
||||||
"""
|
"""
|
||||||
try:
|
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
|
return buy_now_is_active
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user