Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation on special attributes #48

Closed
DreckSoft opened this issue Mar 27, 2022 · 10 comments
Closed

Improve documentation on special attributes #48

DreckSoft opened this issue Mar 27, 2022 · 10 comments
Labels
contributions welcome Contributions are welcome documentation Improvements or additions to documentation wontfix This will not be worked on

Comments

@DreckSoft
Copy link
Contributor

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
Copy link
Contributor Author

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

@sebthom sebthom added contributions welcome Contributions are welcome documentation Improvements or additions to documentation labels Mar 27, 2022
@chrwm
Copy link

chrwm commented Apr 5, 2022

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!

@sebthom
Copy link
Contributor

sebthom commented Apr 5, 2022

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

@chrwm
Copy link

chrwm commented Apr 5, 2022

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.

@sebthom
Copy link
Contributor

sebthom commented Apr 5, 2022

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

@chrwm
Copy link

chrwm commented Apr 6, 2022

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.

@sebthom
Copy link
Contributor

sebthom commented Apr 6, 2022

Can you give this a try:

git fetch
git reset origin/main --hard

@chrwm
Copy link

chrwm commented Apr 7, 2022

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!

@stale stale bot added the wontfix This will not be worked on label Sep 29, 2022
@sebthom sebthom removed the wontfix This will not be worked on label Sep 29, 2022
@Second-Hand-Friends Second-Hand-Friends deleted a comment from stale bot Sep 29, 2022
@rockodd
Copy link

rockodd commented Oct 19, 2022

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

Someone knows how to use checkboxes?

@stale
Copy link

stale bot commented Feb 17, 2023

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 stale bot added the wontfix This will not be worked on label Feb 17, 2023
@stale stale bot closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome Contributions are welcome documentation Improvements or additions to documentation wontfix This will not be worked on
Development

No branches or pull requests

4 participants