This commit is contained in:
Airwave1981
2022-09-30 11:14:11 +02:00
parent 2071d02d7e
commit af8041a1f8

View File

@@ -509,14 +509,15 @@ class KleinanzeigenBot(SeleniumMixin):
# set contact phone # set contact phone
############################# #############################
if ad_cfg["contact"]["phone"]: if ad_cfg["contact"]["phone"]:
try: if self.webdriver.find_element(By.ID, "postad-phonenumber").is_displayed():
if not self.webdriver.find_element(By.ID, "postad-phonenumber").is_enabled(): try:
self.webdriver.find_element(By.ID, "phoneNumberVisibility").click() if not self.webdriver.find_element(By.ID, "postad-phonenumber").is_enabled():
pause(2000) self.webdriver.find_element(By.ID, "phoneNumberVisibility").click()
except NoSuchElementException: pause(2000)
# ignore except NoSuchElementException:
pass # ignore
self.web_input(By.ID, "postad-phonenumber", ad_cfg["contact"]["phone"]) pass
self.web_input(By.ID, "postad-phonenumber", ad_cfg["contact"]["phone"])
############################# #############################
# upload images # upload images