mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 10:31:50 +01:00
support special category attributes (#33)
This commit is contained in:
@@ -273,6 +273,9 @@ category: Notebooks
|
|||||||
price:
|
price:
|
||||||
price_type: # one of: FIXED, NEGOTIABLE, GIVE_AWAY
|
price_type: # one of: FIXED, NEGOTIABLE, GIVE_AWAY
|
||||||
|
|
||||||
|
special_attributes:
|
||||||
|
haus_mieten.zimmer_d: 5 # Zimmer
|
||||||
|
|
||||||
shipping_type: # one of: PICKUP, SHIPPING, NOT_APPLICABLE
|
shipping_type: # one of: PICKUP, SHIPPING, NOT_APPLICABLE
|
||||||
|
|
||||||
# list of wildcard patterns to select images
|
# list of wildcard patterns to select images
|
||||||
|
|||||||
@@ -404,6 +404,13 @@ class KleinanzeigenBot(SeleniumMixin):
|
|||||||
if ad_cfg["price_type"] != "GIVE_AWAY":
|
if ad_cfg["price_type"] != "GIVE_AWAY":
|
||||||
self.web_input(By.ID, "pstad-price", ad_cfg["price"])
|
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
|
# set description
|
||||||
#############################
|
#############################
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ type:
|
|||||||
title:
|
title:
|
||||||
description:
|
description:
|
||||||
category:
|
category:
|
||||||
|
special_attributes: {}
|
||||||
price:
|
price:
|
||||||
price_type:
|
price_type:
|
||||||
shipping_type:
|
shipping_type:
|
||||||
|
|||||||
Reference in New Issue
Block a user