mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
@@ -505,7 +505,7 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
self.__set_shipping_options(ad_cfg)
|
||||
else:
|
||||
try:
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "SelectionButton--Right")]')
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "jsx-2623555103")]')
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "CarrierSelectionModal--Button")]')
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "CarrierOption--Main")]')
|
||||
if ad_cfg["shipping_costs"]:
|
||||
@@ -532,10 +532,10 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
sell_directly = ad_cfg["sell_directly"]
|
||||
try:
|
||||
if sell_directly and ad_cfg["shipping_type"] == "SHIPPING" and ad_cfg["shipping_options"] and price_type in {"FIXED", "NEGOTIABLE"}:
|
||||
if not self.webdriver.find_element(By.ID, "buy-now-toggle").is_selected():
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//div[contains(@class, "Toggle--Slider")]')
|
||||
elif self.webdriver.find_element(By.ID, "buy-now-toggle").is_selected():
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//span[contains(@class, "Toggle--Slider")]')
|
||||
if not self.webdriver.find_element(By.ID, "radio-buy-now-yes").is_selected():
|
||||
self.web_click(By.XPATH, '//*[contains(@id, "radio-buy-now-yes")]')
|
||||
elif not self.webdriver.find_element(By.ID, "radio-buy-now-no").is_selected():
|
||||
self.web_click(By.XPATH, '//*[contains(@id, "radio-buy-now-no")]')
|
||||
except NoSuchElementException as ex:
|
||||
LOG.debug(ex, exc_info = True)
|
||||
|
||||
@@ -566,7 +566,7 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
#############################
|
||||
# set contact name
|
||||
#############################
|
||||
if ad_cfg["contact"]["name"]:
|
||||
if ad_cfg["contact"]["name"] and not self.webdriver.find_element(By.ID, "postad-contactname").get_attribute("readonly"):
|
||||
self.web_input(By.ID, "postad-contactname", ad_cfg["contact"]["name"])
|
||||
|
||||
#############################
|
||||
|
||||
Reference in New Issue
Block a user