mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
* fixes #440 css update * fixed class selector * added missing translation --------- Co-authored-by: Jens Bergmann <1742418+1cu@users.noreply.github.com>
This commit is contained in:
@@ -887,8 +887,8 @@ 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, "ShippingSection")]//*//button[contains(@class, "SelectionButton")]')
|
||||
await self.web_click(By.CSS_SELECTOR, '[class*="CarrierSelectionModal--Button"]')
|
||||
await self.web_click(By.XPATH, '//*[contains(@class, "SubSection")]//*//button[contains(@class, "SelectionButton")]')
|
||||
await self.web_click(By.CSS_SELECTOR, '[class*="CarrierSelectionModal"]')
|
||||
await self.__set_shipping_options(ad_cfg)
|
||||
else:
|
||||
try:
|
||||
@@ -899,8 +899,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
await self.web_select(By.XPATH, special_shipping_selector, shipping_value)
|
||||
else:
|
||||
await self.web_click(By.XPATH,
|
||||
'//*[contains(@class, "ShippingSection")]//*//button[contains(@class, "SelectionButton")]')
|
||||
await self.web_click(By.CSS_SELECTOR, '[class*="CarrierSelectionModal--Button"]')
|
||||
'//*[contains(@class, "SubSection")]//*//button[contains(@class, "SelectionButton")]')
|
||||
await self.web_click(By.CSS_SELECTOR, '[class*="CarrierSelectionModal"]')
|
||||
await self.web_click(By.CSS_SELECTOR, '[class*="CarrierOption--Main"]')
|
||||
if ad_cfg["shipping_costs"]:
|
||||
await self.web_input(By.CSS_SELECTOR, '.IndividualShippingInput input[type="text"]', str.replace(ad_cfg["shipping_costs"], ".", ",")
|
||||
@@ -966,9 +966,13 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
except TimeoutError as ex:
|
||||
LOG.debug(ex, exc_info = True)
|
||||
|
||||
await self.web_click(By.XPATH, '//*[contains(@class, "ModalDialog--Actions")]//button[.//*[text()[contains(.,"Fertig")]]]')
|
||||
except TimeoutError as ex:
|
||||
LOG.debug(ex, exc_info = True)
|
||||
try:
|
||||
# Click apply button
|
||||
await self.web_click(By.XPATH, '//*[contains(@class, "ModalDialog--Actions")]//button[.//*[text()[contains(.,"Bestätigen")]]]')
|
||||
except TimeoutError as ex:
|
||||
raise TimeoutError(_("Unable to close shipping dialog!")) from ex
|
||||
|
||||
async def __upload_images(self, ad_cfg: dict[str, Any]) -> None:
|
||||
LOG.info(" -> found %s", pluralize("image", ad_cfg["images"]))
|
||||
|
||||
Reference in New Issue
Block a user