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

404 error trying to download some titles #82

Open
stratowagon opened this issue Dec 9, 2024 · 15 comments
Open

404 error trying to download some titles #82

stratowagon opened this issue Dec 9, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@stratowagon
Copy link

stratowagon commented Dec 9, 2024

I'm getting failures on roughly 5% of titles I try to download from in the last 24 hours. The weird thing is:

  1. The titles that fail ALWAYS fail, it doesn't seem to be a transient issue (though it's only been 24 hours). I can still download the majority of titles just fine, but the ones that fail still persist. (It's possible there is a cloudflare issue, although I can manually browse the pages of these titles)

  2. I've been using 2.1.9 for almost a week and these issues only started yesterday. I've downloaded hundreds of titles in the last week (2.1.9 has been MUCH FASTER thank you!) and

Chrome ver: 131.0.6778.109
Extension ver: 2.1.9

image

some example titles that are giving me this error:
542423
542267
542222
542436

[Edit] With some more testing, it seems every title that has been uploaded in the last 3-4 days is failing (around Dec 6th or 7th?), while anything older than that is downloading fine. I haven't found an exact cutoff, but I have not found anything older than a week that is failing.

[edit 2] 542133 appears to be the highest number that still downloads. Everything higher than that is failing. 542133 was uploaded somewhere near midnight on Dec 6th (PST). The next one (542134) was uploaded within the same hour, but it and everything after is failing.

@stratowagon stratowagon added the bug Something isn't working label Dec 9, 2024
@internetofshiz
Copy link

internetofshiz commented Dec 11, 2024

I can add some more information, older doujinshi are being served images from i.nhentai.net, but new doujin are coming from i1.nhentai.net.

NHentaiDownloader/src/background/Downloader.ts expects images to come from i.nhentai.net (line 167)

It seems like nhentai is adding new image servers in an attempt to alleviate the slow image loading, i1 seems like the only new one so far.

@Xwilarg
Copy link
Owner

Xwilarg commented Dec 11, 2024

Hmmm, indeed, the JSON I used doesn't seem to hold the information on which subdomain the page is at, and by looking at some others doujinshi there seem to be others ones (I noticed i2. to i4.) so far

@internetofshiz
Copy link

Only thing I could find was window.reader.image_cache[1].image.currentSrc, but this only works when you're in the reader since it relies on the reader caching images.

@mr-twelve98
Copy link

after reading comments from internetofshiz I just changed the code from i.nhentai.net to i1.nhentai.net and reinstalled the extension, after that I was able to download the latest doujinshi without any problems, I don't know if this works on everyone but at least it works for me

example of what i download
#543204
Screenshot_1

@internetofshiz
Copy link

internetofshiz commented Dec 12, 2024

It seems like each new server has a copy of all images. It might be enough to just pick a server at random for downloading (to help nhentai with load balancing) newer doujinshi

edit: it appears even old doujinshi are now being load balanced too

@Krauze95
Copy link

sorry a noob here, how can i edit the code?

@Xwilarg
Copy link
Owner

Xwilarg commented Dec 13, 2024

sorry a noob here, how can i edit the code?

The best way if you want to push a change is to click the "Fork" button at the main page of this project, do your changes locally then you can do a pull request

If you just want to do changes for yourself you can click the "Code" button then "Download ZIP" and do your changes

@hiyoke25
Copy link

すみません、初心者なのですが、コードを編集するにはどうすればいいでしょうか?

Unzip the zip file, open Downloader.ts and change i.nhentai.net to i1.nhentai.net

After that, change i.nhentai.net in manifest.jion file to the same way.
After that, reinstalling the extension worked. The environment is chrome browser.

This may be strange because English is not my native language.

@Phantesia
Copy link

Phantesia commented Dec 15, 2024

Unzip the zip file, open Downloader.ts and change i.nhentai.net to i1.nhentai.net

where is Downloader.ts? I could only find i.nhentai.net in manifest.json, i dont see any Downloader.ts file

@mr-twelve98
Copy link

Unzip the zip file, open Downloader.ts and change i.nhentai.net to i1.nhentai.net

where is Downloader.ts? I could only find i.nhentai.net in manifest.json, i dont see any Downloader.ts file

Try looking in background.js

@Phantesia
Copy link

Unzip the zip file, open Downloader.ts and change i.nhentai.net to i1.nhentai.net

where is Downloader.ts? I could only find i.nhentai.net in manifest.json, i dont see any Downloader.ts file

Try looking in background.js

After replacing both instances of i.nhentai.net to i1.nhentai.net its working now, tysm!!!

@hiyoke25
Copy link

Sorry for the confusion with the wrong explanation.

@Athlas97
Copy link

I've done everything written here but it just won't work for me.
Could i get an step by step ? that way i can try to see if i'm just stupid or something else is wrong.
(would probably help future visitors as well)

@mr-twelve98
Copy link

I've done everything written here but it just won't work for me. Could i get an step by step ? that way i can try to see if i'm just stupid or something else is wrong. (would probably help future visitors as well)

Download zip file from release page.
extract it.
change i.nhentai.net to i1.nhentai.net on manifest.json and background.js.
reinstall the extension.

this work on chrome, idk about firefox

@internetofshiz
Copy link

I submitted a pull request for this issue

#85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants