mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
committed by
Sebastian Thomschke
parent
f85aedab0a
commit
719d40cc5b
@@ -502,11 +502,15 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
# set sell_directly
|
||||
#############################
|
||||
sell_directly = ad_cfg["sell_directly"]
|
||||
if sell_directly and ad_cfg["shipping_type"] == "SHIPPING" and ad_cfg["shipping_options"] and price_type in {"FIXED", "NEGOTIABLE"}:
|
||||
try:
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//span[contains(@class, "Toggle--Slider")]')
|
||||
except NoSuchElementException as ex:
|
||||
LOG.debug(ex, exc_info = True)
|
||||
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")]//span[contains(@class, "Toggle--Slider")]')
|
||||
else:
|
||||
if self.webdriver.find_element(By.ID, "buy-now-toggle").is_selected():
|
||||
self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//span[contains(@class, "Toggle--Slider")]')
|
||||
except NoSuchElementException as ex:
|
||||
LOG.debug(ex, exc_info = True)
|
||||
|
||||
#############################
|
||||
# set description
|
||||
|
||||
Reference in New Issue
Block a user