kleinanzeigen-bot icon indicating copy to clipboard operation
kleinanzeigen-bot copied to clipboard

Improve documentation on special attributes

Open DreckSoft opened this issue 2 years ago • 9 comments

Contrary to the old Kleinanzeigen script, the new bot requires specifying the option value instead of the text. This is not clear from the documentation i think. Would be better to mention what has to be entered.

DreckSoft avatar Mar 27 '22 14:03 DreckSoft

It is also unclear how to click checkboxes, for example in Cars autos.abs_b

DreckSoft avatar Mar 27 '22 17:03 DreckSoft

I agree the documentation could be improved. I get an error when I want to insert an ad in the category Auto, Rad & Boot/Fahrräder & Zubehör/Zubehör/Rennräder

Category -> (Auto, Rad & Boot/Fahrräder & Zubehör/Zubehör) Special Attribute -> Rennräder

The variables in my .yaml ad-file look like: category: 210/217/zubehoer special_attributes: {"fahrraeder.type_s": "rennrad"}

The inspector says I'm using the correct id's and values for the special_attributes and when I run the script the category and special_attributes actually get inserted. image

But then the script stops and prompts this this error message:

File "~\kleinanzeigen-bot\kleinanzeigen_bot\__init__.py", line 430, in publish_ad
self.web_input(By.ID, special_property['key'], special_property['value'])
TypeError: string indices must be integers
←[0m

Is my syntax for the special_attributes variable in the yaml file correct -> special_attributes: {"fahrraeder.type_s": "rennrad"} ? I just assumed it's a dict.

Thanks in advance!

chrwm avatar Apr 05 '22 19:04 chrwm

@chrwn It looks like you are using a too old version of the bot

sebthom avatar Apr 05 '22 19:04 sebthom

I'm using Installation from source and Python 3.10.2 and the CLI. I cloned the newest repo.

pdm run app version prints 0.1.dev72+gc62528f

I'm not sure if this is the newest version though. I can't see a changelog or versioning here.

chrwm avatar Apr 05 '22 21:04 chrwm

This code self.web_input(By.ID, special_property['key'], special_property['value']) from your error message does not exist in then main branch anymore. So something seems off.

When I check the version I get:

> pdm run app version
Running <task app>: ['python', '-m', 'kleinanzeigen_bot', 'version']
0.1.dev106+g407659a.d20220327

You can try to run:

$ git pull
$ pdm sync

sebthom avatar Apr 05 '22 22:04 sebthom

Thanks for the hint. I already did git pull (on the main branch) but not pdm sync. After running both. I get the new version:

pdm run app version
Running <task app>: ['python', '-m', 'kleinanzeigen_bot', 'version']
0.1.dev113+g8b9169d.d20220406

I still run into the same problem. I appreciate your help. For now, I think I'll try a different method from installation .

Maybe you can verify that the syntax for the special_attributes is correct so that the issue can be closed.

chrwm avatar Apr 06 '22 07:04 chrwm

Can you give this a try:

git fetch
git reset origin/main --hard

sebthom avatar Apr 06 '22 12:04 sebthom

I tried:

> git fetch
> git reset origin/main --hard
> pdm sync
> pdm run app version
Running <task app>: ['python', '-m', 'kleinanzeigen_bot', 'version']
0.1.dev113+g8b9169d

and publishing works now, thanks!

chrwm avatar Apr 07 '22 09:04 chrwm

It is also unclear how to click checkboxes, for example in Cars autos.abs_b

Someone knows how to use checkboxes?

rockodd avatar Oct 19 '22 21:10 rockodd

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If the issue is still valid, please add a respective comment to prevent this issue from being closed automatically. Thank you for your contributions.

stale[bot] avatar Feb 17 '23 00:02 stale[bot]