KJHJason / Cultured-Downloader-CLI

Command-line version of the original Cultured Downloader Python program
GNU General Public License v3.0
22 stars 3 forks source link

[Bug]: Downloading from Kemono always fails with 400 Bad Request #90

Closed palapapa closed 4 months ago

palapapa commented 5 months ago

Which Operating System are you running the program on?

Windows

Program Version

1.2.4

Steps to reproduce the bug

  1. Try downloading anything from Kemono by specifying --creator_url and -s
  2. The log will say Cultured Downloader CLI V1.2.4 [ERROR]: 2024/04/15 17:38:27 the request to ... failed after 4 retries, status code => 400 Bad Request

Expected behaviour

The download not failing.

What error code did you receive? (If any)

N/A

Relevant log output (If any)

Cultured Downloader CLI V1.2.4 [ERROR]: 2024/04/15 17:38:27 the request to https://kemono.su/api/v1/fantia/user/19235 failed after 4 retries, status code => 400 Bad Request

Screenshots (Optional)

No response

KJHJason commented 4 months ago

Thanks for reporting this issue, I have managed to find the cause here: https://github.com/KJHJason/Cultured-Downloader-CLI/blob/main/src/api/kemono/api.go#L306 I forgot why I placed 25 as the increment but it looks like the offset must be a multiple of 50.

Will be adding this simple fix in a release sooner or later. The reason is that while testing, I noticed Kemono's server reliability is not that stable so I might opt for synchronous downloading instead of concurrently which would require some refactoring.