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.org download Keyerror: 'i7' #4730

Closed
Xeno6363 opened this issue Oct 27, 2023 · 6 comments
Closed

Exhentai.org download Keyerror: 'i7' #4730

Xeno6363 opened this issue Oct 27, 2023 · 6 comments

Comments

@Xeno6363
Copy link

Trying to download from exhentai but hit with

[exhentai][error] An unexpected error occurred: KeyError - 'i7'.
Traceback (most recent call last):
File "gallery_dl\job.pyc", line 124, in run
File "gallery_dl\extractor\exhentai.pyc", line 175, in items
File "gallery_dl\extractor\exhentai.pyc", line 310, in images_from_api
KeyError: 'i7'

@RiffyDivine
Copy link

You aren't alone.

[exhentai][debug]
Traceback (most recent call last):
File "gallery_dl\job.pyc", line 124, in run
File "gallery_dl\extractor\exhentai.pyc", line 175, in items
File "gallery_dl\extractor\exhentai.pyc", line 310, in images_from_api
KeyError: 'i7'

@PascualBerchem
Copy link

The JSON returned by the API changed: Replacing "i7" in

origurl, pos = text.extract(page["i7"], '<a href="', '"')
try:
if self.original and origurl:
url = text.unescape(origurl)
data = self._parse_original_info(text.extract(
page["i7"], "ownload original", "<", pos)[0])

with "i6" seems to fix the issue.

@RedCowOwO
Copy link

RedCowOwO commented Oct 29, 2023

I was able to use this up until early yesterday morning as well. However now I have had the same issue with mine and I have even changed the python code that @PascualBerchem mentioned to "i6" but it still gives me the "i7" error. The only thing I could think of for mine is that I have not made any updates or changes to my gallery-dl since February?

@mikf mikf pinned this issue Oct 29, 2023
@tyler-hungerrr
Copy link

tyler-hungerrr commented Oct 29, 2023

Is gallery-dl/gallery_dl/extractor/exhentai.py a file I can edit I cant find it anywhere, or does gallery-dl not work on E-hentai.org for the moment?

@nexen-eve
Copy link

nexen-eve commented Oct 30, 2023

The JSON returned by the API changed: Replacing "i7" in

origurl, pos = text.extract(page["i7"], '<a href="', '"')
try:
if self.original and origurl:
url = text.unescape(origurl)
data = self._parse_original_info(text.extract(
page["i7"], "ownload original", "<", pos)[0])

with "i6" seems to fix the issue.

For me that fixed the JSON metadata but images downloaded are small and corrupted. When opened with a text editor it's actually just the html file showing galleries containing the file.

@GrennKren
Copy link

temporary fix for me

            nextkey, pos = text.extract(page["i3"], "'", "'")
            imgurl , pos = text.extract(page["i3"], 'id="img" src="', '"', pos)
            origurl, pos = text.extract(page["i6"], 'Reload broken image', '<')  # <<<<<<
            origurl, pos = text.extract(page["i6"], '<a href="', '"', pos) # <<<<<<<

mikf added a commit that referenced this issue Oct 30, 2023
- update to new API response layout
- use proper API server URL
- fix 'filesize' metadata
@mikf mikf closed this as completed Oct 30, 2023
@mikf mikf unpinned this issue Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants