mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 18:41:50 +01:00
Readding old behaviour of setting price as fallback. Fixes #106
This commit is contained in:
@@ -464,10 +464,16 @@ class KleinanzeigenBot(SeleniumMixin):
|
|||||||
#############################
|
#############################
|
||||||
price_type = ad_cfg["price_type"]
|
price_type = ad_cfg["price_type"]
|
||||||
if price_type != "NOT_APPLICABLE":
|
if price_type != "NOT_APPLICABLE":
|
||||||
self.web_select(By.XPATH, "//select[@id='price-type-react']", price_type)
|
try:
|
||||||
if safe_get(ad_cfg, "price"):
|
self.web_select(By.XPATH, "//select[@id='price-type-react']", price_type)
|
||||||
self.web_click(By.ID, "post-ad-frontend-price")
|
if safe_get(ad_cfg, "price"):
|
||||||
self.web_input(By.ID, "post-ad-frontend-price", ad_cfg["price"])
|
self.web_click(By.ID, "post-ad-frontend-price")
|
||||||
|
self.web_input(By.ID, "post-ad-frontend-price", ad_cfg["price"])
|
||||||
|
except NoSuchElementException as ex:
|
||||||
|
# code for old HTML version can be removed at one point in future
|
||||||
|
self.web_select(By.XPATH, "//select[@id='priceType']", price_type)
|
||||||
|
if safe_get(ad_cfg, "price"):
|
||||||
|
self.web_input(By.ID, "pstad-price", ad_cfg["price"])
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# set description
|
# set description
|
||||||
|
|||||||
Reference in New Issue
Block a user