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

[Exhentai] Html page is downloaded instead of the last image before hitting image limit #1808

Closed
Fukitsu opened this issue Aug 28, 2021 · 4 comments

Comments

@Fukitsu
Copy link

Fukitsu commented Aug 28, 2021

I know it was fixed in #1437 but it started happening to me again, not sure since when but I suspect it started since I got the "More Pages" hath perks which raised the image limit up to 50000 instead of the usual 5000 though that doesn't make much sense. It happens with big galleries like this one for example:
https://exhentai.org/g/1966459/205507c4ed/

The image number 455 is downloaded fine but the number 456 is an html page. Does this happen to anyone else? Is there a way to make gallery-dl check if the last image is an html and give the link to the previous image (second to last), in this case number 456 instead of number 457?

@Twi-Hard
Copy link

Twi-Hard commented Aug 29, 2021

My limit is also 50,000 but I'm not having that issue.
These are my settings:

"exhentai": {
      "domain": "auto",
      "limits": 50000,
      "metadata": true,
      "original": true,
      "wait-min": 6.0,
      "wait-max": 10.0,
      "sleep": 3,
      "sleep-request": 2,
      "sleep-extractor": 3,
      "username": null,
      "password": null,
      "skip": "abort",
      "cookies": {
        "ipb_member_id": REDACTED,
        "ipb_pass_hash": REDACTED,
        "hath_perks": REDACTED,
        "ipb_session_id": REDACTED,
        "sk": REDACTED,
        "star": REDACTED,
        "event": REDACTED
      },
      "base-directory": REDACTED,
      "directory": [
        "{eh_category}",
        "{gid} - {title}"
      ],
      "filename": "{num:>04}_{filename}.{extension!l}"
    },

If something's different in your config it might help identify the issue?

Edit: This is my version
1.18.4-dev

@Fukitsu
Copy link
Author

Fukitsu commented Aug 29, 2021

I added "limits": 50000 and that seems to have fixed the issue, thank you

@Fukitsu Fukitsu closed this as completed Aug 29, 2021
mikf added a commit that referenced this issue Aug 29, 2021
Check for a 'text/html' Content-Type instead of the very specific
137 bytes Content-Length, which might change depending on compression
or other factors.
@mikf
Copy link
Owner

mikf commented Aug 29, 2021

Do you still have that HTML file lying around? Does it contain the following text?

You have exceeded your image viewing limits. Note that you can reset these limits by going <a href="https://exhentai.org/home.php">here</a>.

When limits is not a number, gallery-dl checked for the image limit by comparing the Content-Length header to a specific value, which would be different when the error message is not the same for everyone. I've now changed it to only check for a text/html Content-Type 5785462, but I'd still like to know why the previous method didn't work for you.

@Fukitsu
Copy link
Author

Fukitsu commented Aug 29, 2021

Yes, it's that same message. It's weird since the previous method had been working fine until I raised my image limits

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

3 participants