L4cache / kemono-dl

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

Error when Getting to a Certain Artist. #11

Closed itsaferbie closed 1 year ago

itsaferbie commented 1 year ago

Version

Version: 2202.04.28 (Latest git from here)

Your Command


python kemono-dl.py --cookies "kemono.party_cookies.txt" --dirname-pattern "X:\smol\Kemono\{service}\{username} [{user_id}]" --filename-pattern "[{published}] [{id}] {title}\[{index}]_{filename}.{ext}" --inline-filename-pattern "[{published}] [{id}] {title}\inline\[{index}]_{filename}.{ext}" --kemono-fav-users all

Description of bug

Throws up a Traceback Error when reaching artist: https://kemono.party/fanbox/user/8814278

How To Reproduce

Run the command above, and it will error out at the user above.

Error messages and tracebacks


2022-11-12 18:48:20,579:INFO:Downloading posts from kemono.party.party | fanbox | camonome | 8814278
2022-11-12 18:48:20,579:DEBUG:Requesting user json from: https://kemono.party/api/fanbox/user/8814278?o=0
2022-11-12 18:48:22,024:ERROR:Unable to get favorite users from kemono.party
Traceback (most recent call last):
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \uXXXX escape: line 1 column 1523429 (char 1523428)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\smol\l4-kemono\kemono-dl\src\main.py", line 706, in start_download
    self.get_favorites('kemono.party', 'artist', self.k_fav_users)
  File "X:\smol\l4-kemono\kemono-dl\src\main.py", line 130, in get_favorites
    self.get_post(f"https://{domain}/{favorite['service']}/user/{favorite['id']}")
  File "X:\smol\l4-kemono\kemono-dl\src\main.py", line 158, in get_post
    json = self.session.get(url=f"{api}?o={chunk}", cookies=self.cookies, headers=self.headers, timeout=self.timeout).json()
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 917, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Invalid \uXXXX escape]

Additional comments

debug.log

L4cache commented 1 year ago

I can't reproduce it :|

itsaferbie commented 1 year ago

I just went and readded them to my favorites and downloaded again. So far it seems to be working again.

Maybe just something on Kemono's side was acting weird when I would try to download.