mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
support special category attributes (#33)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
#############################
|
||||
|
||||
@@ -3,6 +3,7 @@ type:
|
||||
title:
|
||||
description:
|
||||
category:
|
||||
special_attributes: {}
|
||||
price:
|
||||
price_type:
|
||||
shipping_type:
|
||||
|
||||
Reference in New Issue
Block a user