diff --git a/README.md b/README.md index c58f15b..3d37acf 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,9 @@ category: Notebooks price: price_type: # one of: FIXED, NEGOTIABLE, GIVE_AWAY +special_attributes: + haus_mieten.zimmer_d: 5 # Zimmer + shipping_type: # one of: PICKUP, SHIPPING, NOT_APPLICABLE # list of wildcard patterns to select images diff --git a/kleinanzeigen_bot/__init__.py b/kleinanzeigen_bot/__init__.py index c629427..785c239 100644 --- a/kleinanzeigen_bot/__init__.py +++ b/kleinanzeigen_bot/__init__.py @@ -404,6 +404,13 @@ class KleinanzeigenBot(SeleniumMixin): if ad_cfg["price_type"] != "GIVE_AWAY": self.web_input(By.ID, "pstad-price", ad_cfg["price"]) + ############################# + # set special properties of category + ############################# + if ad_cfg["special_attributes"]: + for special_property_key, special_property_value in ad_cfg["special_attributes"]: + self.web_input(By.ID, special_property_key, special_property_value) + ############################# # set description ############################# diff --git a/kleinanzeigen_bot/resources/ad_fields.yaml b/kleinanzeigen_bot/resources/ad_fields.yaml index efea629..c944e7e 100644 --- a/kleinanzeigen_bot/resources/ad_fields.yaml +++ b/kleinanzeigen_bot/resources/ad_fields.yaml @@ -3,6 +3,7 @@ type: title: description: category: +special_attributes: {} price: price_type: shipping_type: