Ljzd-PRO / KToolBox

Downloader for Kemono.party / .su with High Customizability | 高度可自定义性的 Kemono 下载器
https://ktoolbox.readthedocs.io
BSD 3-Clause "New" or "Revised" License
169 stars 7 forks source link

Kemono API call failed #104

Open eyeszx opened 1 month ago

eyeszx commented 1 month ago

Any idea ?

image_2024-05-04_201142382

Ljzd-PRO commented 1 month ago

It may caused by network issues

ddt510 commented 1 month ago

I have encountered similar issue. coomer sometimes give me error 503 while browsing it. Does it mean the network issue is on the website's end?

.\ktoolbox sync-creator "https://coomer.su/onlyfans/user/hollyharper11" --start-time="2020-05-01" --end-time="2025-01-01"

2024-05-12 12:52:51.477 | INFO     | ktoolbox.cli:sync_creator:271 - Got creator information - {'name': 'hollyharper11', 'id': 'hollyharper11'}
2024-05-12 12:52:51.479 | INFO     | ktoolbox.action.job:create_job_from_creator:148 - Start fetching posts from creator hollyharper11
2024-05-12 12:52:56.477 | ERROR    | ktoolbox.api.base:_retry_error_callback:37 - Kemono API call failed - {'ret': APIRet(code=1002, message="1 validation error for Response\n  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\\n<html>\\...>\\n  </body>\\n</html>\\n', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid", exception=1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid, data=None)}
1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid
Ljzd-PRO commented 1 month ago

I have encountered similar issue. coomer sometimes give me error 503 while browsing it. Does it mean the network issue is on the website's end?

.\ktoolbox sync-creator "https://coomer.su/onlyfans/user/hollyharper11" --start-time="2020-05-01" --end-time="2025-01-01"

2024-05-12 12:52:51.477 | INFO     | ktoolbox.cli:sync_creator:271 - Got creator information - {'name': 'hollyharper11', 'id': 'hollyharper11'}
2024-05-12 12:52:51.479 | INFO     | ktoolbox.action.job:create_job_from_creator:148 - Start fetching posts from creator hollyharper11
2024-05-12 12:52:56.477 | ERROR    | ktoolbox.api.base:_retry_error_callback:37 - Kemono API call failed - {'ret': APIRet(code=1002, message="1 validation error for Response\n  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\\n<html>\\...>\\n  </body>\\n</html>\\n', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid", exception=1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid, data=None)}
1 validation error for Response
  Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<!DOCTYPE html>\n<html>\...>\n  </body>\n</html>\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/json_invalid
PS C:\Users\mcdha\Downloads> ktoolbox sync-creator "https://coomer.su/onlyfans/user/hollyharper11" --start-time="2020-05-01" --end-time="2025-01-01"
2024-05-22 16:55:49.721 | INFO     | ktoolbox.cli:sync_creator:271 - Got creator information - {'name': 'hollyharper11', 'id': 'hollyharper11'}
2024-05-22 16:55:49.723 | INFO     | ktoolbox.action.job:create_job_from_creator:148 - Start fetching posts from creator hollyharper11
2024-05-22 16:55:51.686 | INFO     | ktoolbox.action.job:create_job_from_creator:174 - Get 140 posts, start creating jobs
1071779665_1080x1919_37ca7c4810a3393b5b4437b7265a51f4.jpg: 100%|████████████████████| 258k/258k [00:00<00:00, 359kiB/s]
1080x1920_b4666525d7888315f62c375493a06354.jpg: 100%|███████████████████████████████| 247k/247k [00:01<00:00, 134kiB/s]
1066830661_0hpnp137ua0agvbsn86uy_source.mp4:  25%|███████▊                       | 1.75M/6.97M [00:04<00:04, 1.30MiB/s]

I tried it and it works. If the Coomer API call fails, you can try modifying the configuration to:

# For Coomer API
KTOOLBOX_API__NETLOC=coomer.su

# For downloading files from Coomer server
KTOOLBOX_API__FILES_NETLOC=coomer.su

https://ktoolbox.readthedocs.io/latest/coomer/