Skip to content

[ImageBam] Deleted images throw TypeError #8890

@taskhawk

Description

@taskhawk

Example: https://www.imagebam.com/image/40a481151474621

$ gallery-dl --config-ignore -vK "http://www.imagebam.com/image/40a481151474621"
[gallery-dl][debug] Version 1.31.2
[gallery-dl][debug] Python 3.12.3 - Linux-6.14.0-37-generic-x86_64-with-glibc2.39
[gallery-dl][debug] requests 2.32.3 - urllib3 2.4.0
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting KeywordJob for 'http://www.imagebam.com/image/40a481151474621'
[imagebam][debug] Using ImagebamImageExtractor for 'http://www.imagebam.com/image/40a481151474621'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.imagebam.com:443
[urllib3.connectionpool][debug] https://www.imagebam.com:443 "GET /image/40a481151474621 HTTP/1.1" 200 None
[imagebam][error] An unexpected error occurred: TypeError - argument of type 'NoneType' is not iterable. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[imagebam][debug] 
Traceback (most recent call last):
  File "/home/user/.gallery-dl/lib/python3.12/site-packages/gallery_dl/job.py", line 158, in run
    msg = self.dispatch(extractor)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.gallery-dl/lib/python3.12/site-packages/gallery_dl/job.py", line 209, in dispatch
    for msg, url, kwdict in messages:
  File "/home/user/.gallery-dl/lib/python3.12/site-packages/gallery_dl/extractor/imagebam.py", line 96, in items
    image = self._parse_image_page(path)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.gallery-dl/lib/python3.12/site-packages/gallery_dl/extractor/imagebam.py", line 31, in _parse_image_page
    filename = text.unescape(text.extract(page, 'alt="', '"', pos)[0])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/html/__init__.py", line 130, in unescape
    if '&' not in s:
       ^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions