Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting mirror to nhentai.to breaks on request parsing #301

Open
Spyridion opened this issue Feb 6, 2024 · 4 comments
Open

Setting mirror to nhentai.to breaks on request parsing #301

Spyridion opened this issue Feb 6, 2024 · 4 comments

Comments

@Spyridion
Copy link
Contributor

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)`

@RicterZ
Copy link
Owner

RicterZ commented Feb 6, 2024

nhentai.net and nhentai.to are not the same, the webpage structures are different.
I'm considering adding support for nhentai.io

@CaptainChicky
Copy link

oh huh that was why setting a nhentai.to mirror didnt work lol

@Spyridion
Copy link
Contributor Author

Ah dang, I didn't realize the site structure was different. T_T

@SandyRodgers-2017
Copy link

nhentai.net and nhentai.to are not the same, the webpage structures are different. I'm considering adding support for nhentai.io

Thank you for everything. It would be great if you were to do so. The nhentai purges have seemingly made it the only way to find some of the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants