#573 refactored shipping_option (#574)

This commit is contained in:
Heavenfighter
2025-07-07 19:58:30 +02:00
committed by GitHub
parent b7882065b7
commit 146d29c62c

View File

@@ -1071,7 +1071,7 @@ class KleinanzeigenBot(WebScrapingMixin):
except TimeoutError as ex: except TimeoutError as ex:
LOG.debug(ex, exc_info = True) LOG.debug(ex, exc_info = True)
elif ad_cfg.shipping_options: elif ad_cfg.shipping_options:
await self.web_click(By.XPATH, '//*[contains(@class, "SubSection")]//button[contains(@class, "SelectionButton")]') await self.web_click(By.XPATH, '//button//span[contains(., "Versandmethoden auswählen")]')
if mode == AdUpdateStrategy.MODIFY: if mode == AdUpdateStrategy.MODIFY:
try: try:
@@ -1092,7 +1092,8 @@ class KleinanzeigenBot(WebScrapingMixin):
try: try:
# no options. only costs. Set custom shipping cost # no options. only costs. Set custom shipping cost
if ad_cfg.shipping_costs is not None: if ad_cfg.shipping_costs is not None:
await self.web_click(By.XPATH, '//*[contains(@class, "SubSection")]//button[contains(@class, "SelectionButton")]') await self.web_click(By.XPATH,
'//button//span[contains(., "Versandmethoden auswählen")]')
try: try:
# when "Andere Versandmethoden" is not available, then we are already on the individual page # when "Andere Versandmethoden" is not available, then we are already on the individual page