Second-Hand-Friends / kleinanzeigen-bot

A dilligent command line tool to publish ads on kleinanzeigen.de
GNU Affero General Public License v3.0
197 stars 43 forks source link

[BUG] price_type set before price is set #300

Closed G-Huber closed 3 months ago

G-Huber commented 3 months ago

βœ”οΈ Expected Behaviour

Kleinanzeigen resets price_type to fixed when setting price. So kleinanzeigen-bot would have to make sure to set price before setting price_type

🐞 Actual Behaviour

price_type is set after price causing the Kleinanzeigen webpage to reset the price_type field.

πŸ“‹ Steps to Reproduce

Possibly configuration dependent?

πŸ“Ί What browsers are you seeing the problem on? (if applicable)

No response

πŸ’» What operating systems are you seeing the problem on? (if applicable)

No response

πŸ“ƒ Relevant log output (if applicable)

Create ad based on following Template and config.yaml from documentation:

active: # true # true or false
type: # OFFER # one of: OFFER, WANTED
title:
description: ""
# can be multiline, see syntax here https://yaml-multiline.info/

# built-in category name as specified in https://github.com/Second-Hand-Friends/kleinanzeigen-bot/blob/main/kleinanzeigen_bot/resources/categories.yaml
# or custom category name as specified in config.yaml
# or category ID (e.g. 161/27)
category: Notebooks
special_attributes:

price:
price_type: # NEGOTIABLE # one of: FIXED, NEGOTIABLE, GIVE_AWAY

shipping_type: # SHIPPING # one of: PICKUP, SHIPPING, NOT_APPLICABLE
shipping_costs: # e.g. 2.95

# specify shipping options / packages
# it is possible to select multiple packages, but only from one size (S, M, L)!
# possible package types for size S:
# - DHL_2
# - Hermes_PΓ€ckchen
# - Hermes_S
# possible package types for size M:
# - DHL_5
# - Hermes_M
# possible package types for size L:
# - DHL_10
# - DHL_31,5
# - Hermes_L
shipping_options: []
sell_directly: # false # true or false, requires shipping_options to take effect

# list of wildcard patterns to select images
# if relative paths are specified, then they are relative to this ad configuration file
images:
  - '*.{JPG,jpg,png}'

id: # set automatically
created_on: # set automatically
updated_on: # set automatically

Code of Conduct

G-Huber commented 3 months ago

Seems this has already been addressed in #276

G-Huber commented 3 months ago

This does not seem to depend on configuration.

I removed price_type from config.yaml and added it to ad.yaml right before price.

Still behaves the same.