From 146d29c62ccffabfca85ebe892cee3e793c53b99 Mon Sep 17 00:00:00 2001 From: Heavenfighter <33938595+Heavenfighter@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:58:30 +0200 Subject: [PATCH] #573 refactored shipping_option (#574) --- src/kleinanzeigen_bot/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kleinanzeigen_bot/__init__.py b/src/kleinanzeigen_bot/__init__.py index 649ebae..e6f7ce9 100644 --- a/src/kleinanzeigen_bot/__init__.py +++ b/src/kleinanzeigen_bot/__init__.py @@ -1071,7 +1071,7 @@ class KleinanzeigenBot(WebScrapingMixin): except TimeoutError as ex: LOG.debug(ex, exc_info = True) 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: try: @@ -1092,7 +1092,8 @@ class KleinanzeigenBot(WebScrapingMixin): try: # no options. only costs. Set custom shipping cost 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: # when "Andere Versandmethoden" is not available, then we are already on the individual page