kleinanzeigen-bot
kleinanzeigen-bot copied to clipboard
Improve documentation on special attributes
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.
It is also unclear how to click checkboxes, for example in Cars autos.abs_b
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.
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!
@chrwn It looks like you are using a too old version of the bot
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.
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
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.
Can you give this a try:
git fetch
git reset origin/main --hard
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!
It is also unclear how to click checkboxes, for example in Cars autos.abs_b
Someone knows how to use checkboxes?
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.