Second-Hand-Friends / kleinanzeigen-bot

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

Fix selection of special attributes #321

Closed provinzio closed 3 months ago

provinzio commented 3 months ago

Issue #, if available: fixes #281

Description of changes:

This Pull Requests submits two fixes. 1) The condition is nowadays set within a dialog. I added a function to set the condition accordingly. My implemented option is backwards compatible and requires a mapping from the condition_s key to the friendly name which shall be selected. It might be an idea to change the download behavior to save the condition friendly name ("Neu" instead of the condition_s key "new") in another issue? 2) The special attributes field keys changed from "key" to "category.key". We currently haven't saved the category name anywhere, which makes it difficult to select the special attribute field by full name. Instead this hotfix uses "contains" to find the special attributes field. Credits @Vel-San https://github.com/Second-Hand-Friends/kleinanzeigen-bot/issues/281#issuecomment-2185020997

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

provinzio commented 3 months ago

Sorry for the delay. The PR is ready now. I fixed a typo in "Sehr Gut" and marked the relevant issue to be closed upon merge.

sebthom commented 3 months ago

Thanks a lot!