Second-Hand-Friends / kleinanzeigen-bot

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

[BUG] Download does not work if too many ads #263

Closed euberdeveloper closed 8 months ago

euberdeveloper commented 8 months ago

βœ”οΈ Expected Behaviour

Even if I have many ads, the bot should be able to download them

🐞 Actual Behaviour

[INFO]  ... pausing for 2367 ms ...
It seems like you have many ads!
[ERROR] IndexError: list index out of range
[15813] Failed to execute script '__main__' due to unhandled exception!

πŸ“‹ Steps to Reproduce

Just have many ads in your profile (~25)

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

Chrome

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

Linux

πŸ“ƒ Relevant log output (if applicable)

[INFO]  ... pausing for 2367 ms ...
It seems like you have many ads!
[ERROR] IndexError: list index out of range
[15813] Failed to execute script '__main__' due to unhandled exception!
2024-02-17 14:24:09,264 [INFO] App version: 2024+52f76f1
2024-02-17 14:24:09,265 [INFO] Python version: 3.12.1 (main, Dec  8 2023, 05:40:51) [GCC 11.4.0]
2024-02-17 14:24:09,266 [WARNING] You provided no ads selector. Defaulting to "new".
2024-02-17 14:24:09,273 [INFO] Loading config from [/home/XXX/Github/meine-kleinanzeigen/config.yaml]...
2024-02-17 14:24:09,309 [INFO]  -> found 145 categories
2024-02-17 14:24:09,309 [INFO] Creating WebDriver session...
2024-02-17 14:24:09,653 [INFO] Using Browser: GOOGLE-CHROME 121.0.6167 [/usr/bin/google-chrome]
2024-02-17 14:24:12,347 [INFO]  -> Browser User Data Dir: /home/XXX/.config/google-chrome
2024-02-17 14:24:12,348 [INFO]  -> Browser Profile Name: Default
2024-02-17 14:24:12,348 [INFO]  -> Custom chrome argument: --disable-dev-shm-usage
2024-02-17 14:24:12,348 [INFO]  -> Custom chrome argument: --no-sandbox
2024-02-17 14:24:12,348 [INFO]  -> Chrome binary location: /usr/bin/google-chrome
2024-02-17 14:24:14,130 [INFO] New WebDriver session is: ee8b2070cb7d0de9b075c83fef0ba3b1 http://localhost:58869
2024-02-17 14:24:14,130 [INFO] Checking if already logged in
2024-02-17 14:24:21,006 [INFO]  ... pausing for 2000 ms ...
2024-02-17 14:24:23,087 [INFO] Already logged in as [XXX@gmail.com]. Skipping login.
2024-02-17 14:24:23,087 [INFO] Scanning your ad overview...
2024-02-17 14:24:32,747 [INFO]  ... pausing for 2699 ms ...
2024-02-17 14:25:10,389 [INFO]  ... pausing for 2637 ms ...
2024-02-17 14:25:13,815 [ERROR] IndexError: list index out of range
2024-02-17 14:29:18,098 [INFO] App version: 2024+52f76f1
2024-02-17 14:29:18,099 [INFO] Python version: 3.12.1 (main, Dec  8 2023, 05:40:51) [GCC 11.4.0]
2024-02-17 14:29:18,099 [WARNING] You provided no ads selector. Defaulting to "new".
2024-02-17 14:29:18,106 [INFO] Loading config from [/home/XXX/Github/meine-kleinanzeigen/config.yaml]...
2024-02-17 14:29:18,150 [INFO]  -> found 145 categories
2024-02-17 14:29:18,151 [INFO] Creating WebDriver session...
2024-02-17 14:29:18,391 [INFO] Using Browser: GOOGLE-CHROME 121.0.6167 [/usr/bin/google-chrome]
2024-02-17 14:29:18,790 [INFO]  -> Browser User Data Dir: /home/XXX/.config/google-chrome
2024-02-17 14:29:18,790 [INFO]  -> Browser Profile Name: Default
2024-02-17 14:29:18,790 [INFO]  -> Custom chrome argument: --disable-dev-shm-usage
2024-02-17 14:29:18,791 [INFO]  -> Custom chrome argument: --no-sandbox
2024-02-17 14:29:18,791 [INFO]  -> Chrome binary location: /usr/bin/google-chrome
2024-02-17 14:29:20,511 [INFO] New WebDriver session is: 89c68aef28405b6c7123e9e172e624c0 http://localhost:50195
2024-02-17 14:29:20,511 [INFO] Checking if already logged in
2024-02-17 14:29:22,237 [INFO]  ... pausing for 2000 ms ...
2024-02-17 14:29:26,048 [INFO] Already logged in as [XXX]. Skipping login.
2024-02-17 14:29:26,049 [INFO] Scanning your ad overview...
2024-02-17 14:29:37,074 [INFO]  ... pausing for 2292 ms ...
2024-02-17 14:30:05,022 [INFO]  ... pausing for 2367 ms ...
2024-02-17 14:30:08,179 [ERROR] IndexError: list index out of range

Code of Conduct

euberdeveloper commented 8 months ago

Any help? @sebthom @jniggemann @pesimon @derlucas

sebthom commented 8 months ago

Can you run it with --verbose and paste the full stacktrace of the IndexError here please.

sebthom commented 8 months ago

Should work in the latest release