L4cache / kemono-dl

(personal fork of) A simple kemono.party downloader using python.
93 stars 14 forks source link

DDOS Protect #14

Closed ytoaa closed 1 year ago

ytoaa commented 1 year ago

The recent update of the chemono has added a kind of firewall that prevents DDoS, which has disrupted the download. The cookie does not change even though it has been updated.

Traceback (most recent call last): File "/home/timi/ext/a/me/TEMPDOWNLOAD/PROGRAM/PYTHON/kemono4/src/main.py", line 741, in start_download self.get_post(url) File "/home/timi/ext/a/me/TEMPDOWNLOAD/PROGRAM/PYTHON/kemono4/src/main.py", line 163, in get_post json = self.session.get(url=f"{api}?o={chunk}", cookies=self.cookies, headers=self.headers, timeout=self.timeout).json() File "/home/timi/.local/lib/python3.10/site-packages/requests/models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] DDOS-GUARD

: 0 INFO:Downloading posts from kemono.party.party | fanbox | pepper0 | 10013868 ERROR:Unable to get posts for https://kemono.party/fanbox/user/10013868 Traceback (most recent call last): File "/home/timi/.local/lib/python3.10/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/timi/ext/a/me/TEMPDOWNLOAD/PROGRAM/PYTHON/kemono4/src/main.py", line 741, in start_download self.get_post(url) File "/home/timi/ext/a/me/TEMPDOWNLOAD/PROGRAM/PYTHON/kemono4/src/main.py", line 163, in get_post json = self.session.get(url=f"{api}?o={chunk}", cookies=self.cookies, headers=self.headers, timeout=self.timeout).json() File "/home/timi/.local/lib/python3.10/site-packages/requests/models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] DDOS-GUARD : 0
L4cache commented 1 year ago

This is really annoying for me as well... I've tried several things to mitigate it but got no progress... (however I do learnt that providing cookies file is not important) Then seems suddenly it solved itself... Is it working on your side now?

ytoaa commented 1 year ago

It's working normally again now. However, I don't know when the symptoms will be repeated again.