Restore functionality to specify the full ad address (#79)

Co-authored-by: DenisLanz <denis.lanz@gmail.com>
Co-authored-by: Sebastian Thomschke <sebthom@users.noreply.github.com>
This commit is contained in:
Denis Lanz
2022-05-25 23:56:56 +02:00
committed by GitHub
parent bfca590ac7
commit 845cf88606

View File

@@ -449,7 +449,14 @@ class KleinanzeigenBot(SeleniumMixin):
#############################
# set contact street
#############################
if ad_cfg["contact"]["street"] and self.webdriver.find_element(By.ID, "pstad-street").is_enabled():
if ad_cfg["contact"]["street"]:
try:
if not self.webdriver.find_element(By.ID, "pstad-street").is_enabled():
self.webdriver.find_element(By.ID, "addressVisibility").click()
pause(2000)
except NoSuchElementException:
# ignore
pass
self.web_input(By.ID, "pstad-street", ad_cfg["contact"]["street"])
#############################