mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
feat: Allow individual shipping without setting shipping costs (#626)
This commit is contained in:
@@ -1112,10 +1112,8 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
else:
|
||||
try:
|
||||
# no options. only costs. Set custom shipping cost
|
||||
if ad_cfg.shipping_costs is not None:
|
||||
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
|
||||
await self.web_click(By.XPATH,
|
||||
@@ -1132,6 +1130,7 @@ class KleinanzeigenBot(WebScrapingMixin):
|
||||
except TimeoutError:
|
||||
await self.web_click(By.XPATH, '//*[contains(@id, "INDIVIDUAL") and contains(@data-testid, "Individueller Versand")]')
|
||||
|
||||
if ad_cfg.shipping_costs is not None:
|
||||
await self.web_input(By.XPATH, '//input[contains(@placeholder, "Versandkosten (optional)")]',
|
||||
str.replace(str(ad_cfg.shipping_costs), ".", ","))
|
||||
await self.web_click(By.XPATH, '//dialog//button[contains(., "Fertig")]')
|
||||
|
||||
Reference in New Issue
Block a user