mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

hentainexus error #5827

Closed b331z3bub closed 3 months ago

b331z3bub commented 3 months ago

Getting an error with https://hentainexus.com/view/715 I tried another link and it worked. https://hentainexus.com/view/178

KeyError: 'image'

verbose log

gallery-dl --write-metadata --no-download "https://hentainexus.com/view/715" --verbose
[gallery-dl][debug] Version 1.27.1 - Git HEAD: e5f776b3e2
[gallery-dl][debug] Python 3.12.4 - macOS-13.2.1-arm64-arm-64bit
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.2
[gallery-dl][debug] Configuration Files ['/etc/gallery-dl.conf', '${HOME}/.config/gallery-dl/config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://hentainexus.com/view/715'
[hentainexus][debug] Using HentainexusGalleryExtractor for 'https://hentainexus.com/view/715'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): hentainexus.com:443
[urllib3.connectionpool][debug] https://hentainexus.com:443 "GET /view/715 HTTP/11" 200 None
[urllib3.connectionpool][debug] https://hentainexus.com:443 "GET /read/715 HTTP/11" 200 None
[hentainexus][error] An unexpected error occurred: KeyError - 'image'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[hentainexus][debug] 
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/gallery-dl/1.27.1/libexec/lib/python3.12/site-packages/gallery_dl/job.py", line 150, in run
    for msg in extractor:
  File "/opt/homebrew/Cellar/gallery-dl/1.27.1/libexec/lib/python3.12/site-packages/gallery_dl/extractor/common.py", line 667, in items
    imgs = self.images(page)
           ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/gallery-dl/1.27.1/libexec/lib/python3.12/site-packages/gallery_dl/extractor/hentainexus.py", line 74, in images
    (img["image"], img)
     ~~~^^^^^^^^^
KeyError: 'image'
mikf commented 3 months ago

The last image in 715 is split into two parts, which gallery-dl doesn't account for at the moment:

[
  {
    "image": "https://images.hentainexus.com/v2/78da1d8e416e43310805efe275540136187a96bfc118ba69a3485946b97bad6ce7e98de6d59eedbb11e154a6c5b8d8d2404a2c1c28247a4ef50159e9246bcc0ca4ae19ae10347440ad309abe13cde67980e63412f5c2bdbaab05b38f8872370d715f3cd4ceb4823d73eb866ab7b64fc6eb6a75b5efaba5a4c65046d8923e86742aaa638de8ab6f3a9955932919c63663811915bd23f24c00bedaed6af78f0a00bf1ef79f0ff93b04b977501480031e0794ff3ef3dddeff1fa548e0/001.png",
    "label": "1",
    "type": "image",
    "url_label": "001"
  },
  {
    "image": "https://images.hentainexus.com/v2/78da1dce396e43310c00d1bbb036026ea2c89ce5379428a5490c032e0ddf3d82db570ce6054ff8063329149d2a155ba76f75c4169503553cac4d2ce66d9d50ab8675672d24528f582d364ac95a5411859d2587330d0b5aa9a3ab5a6f4d2d836d451d9d2d717bad53e4353676b8419d8dd705fb82ef0bd843689acd31b531b234ed46290bcd5998a89b6ae624551a3bfbf9a82686ddf3c40d2fb85d70ffa410f9eb71fff9c8df116a22e86488071e0776fe3ed71bdeff0b00457e/002.png",
    "label": "2",
    "type": "image",
    "url_label": "002"
  },
  {
    "label": "1-2",
    "left": "https://images.hentainexus.com/v2/78da1d8e416e43310805efe275540136187a96bfc118ba69a3485946b97bad6ce7e98de6d59eedbb11e154a6c5b8d8d2404a2c1c28247a4ef50159e9246bcc0ca4ae19ae10347440ad309abe13cde67980e63412f5c2bdbaab05b38f8872370d715f3cd4ceb4823d73eb866ab7b64fc6eb6a75b5efaba5a4c65046d8923e86742aaa638de8ab6f3a9955932919c63663811915bd23f24c00bedaed6af78f0a00bf1ef79f0ff93b04b977501480031e0794ff3ef3dddeff1fa548e0/001.png",
    "right": "https://images.hentainexus.com/v2/78da1dce396e43310c00d1bbb036026ea2c89ce5379428a5490c032e0ddf3d82db570ce6054ff8063329149d2a155ba76f75c4169503553cac4d2ce66d9d50ab8675672d24528f582d364ac95a5411859d2587330d0b5aa9a3ab5a6f4d2d836d451d9d2d717bad53e4353676b8419d8dd705fb82ef0bd843689acd31b531b234ed46290bcd5998a89b6ae624551a3bfbf9a82686ddf3c40d2fb85d70ffa410f9eb71fff9c8df116a22e86488071e0776fe3ed71bdeff0b00457e/002.png",
    "type": "spread",
    "url_label": "001-002"
  }
]
b331z3bub commented 3 months ago

Please add the nsfw label. I believe this is a somewhat common problem with the tag:spread galleries with double page spreads. There are 92 such galleries at the moment.

b331z3bub commented 3 months ago

Thanks!