nhentai icon indicating copy to clipboard operation
nhentai copied to clipboard

Setting mirror to nhentai.to breaks on request parsing

Open Spyridion opened this issue 6 months ago • 4 comments

Hi, I'm not sure if this was intended or not, but changing the mirror to "https://nhentai.to" with the docker image lead to an error with the url parsing I think. Here is the trace I got.

`Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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 "/usr/local/bin/nhentai", line 33, in
sys.exit(load_entry_point('nhentai==0.5.3', 'console_scripts', 'nhentai')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/nhentai-0.5.3-py3.12.egg/nhentai/command.py", line 57, in main doujinshis = _search_parser(options.keyword, sorting=options.sorting, page=page_list, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/nhentai-0.5.3-py3.12.egg/nhentai/parser.py", line 282, in search_parser init_response = request('get', url.replace('%2B', '+')).json() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)`

Spyridion avatar Feb 06 '24 08:02 Spyridion