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

[Pixiv] NotFoundError kills extraction when encountering sanity_level work with comments enabled. #6965

Open
Cyantime opened this issue Feb 10, 2025 · 1 comment

Comments

@Cyantime
Copy link

gallery-dl --verbose https://www.pixiv.net/en/artworks/77553391 (This is SFW, much of the gallery is not.)

[gallery-dl][debug] Version 1.28.5
[gallery-dl][debug] Python 3.11.4 - Windows-10-10.0.19044-SP0
[gallery-dl][debug] requests 2.32.3 - urllib3 2.0.4
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.pixiv.net/en/artworks/77553391'
[pixiv][debug] Using PixivWorkExtractor for 'https://www.pixiv.net/en/artworks/77553391'
[pixiv][debug] Loading cookies from '~/gallery-dl/cookies.txt'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): app-api.pixiv.net:443
[urllib3.connectionpool][debug] https://app-api.pixiv.net:443 "GET /v1/illust/detail?illust_id=77553391 HTTP/1.1" 200 396
[pixiv][debug] 77553391: https://s.pximg.net/common/images/limit_unviewable_360.png
[pixiv][warning] 77553391: 'limit_sanity_level' warning
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.pixiv.net:443
[urllib3.connectionpool][debug] https://www.pixiv.net:443 "GET /ajax/illust/77553391 HTTP/1.1" 200 3412
[urllib3.connectionpool][debug] https://app-api.pixiv.net:443 "GET /v3/illust/comments?illust_id=77553391 HTTP/1.1" 404 None
[pixiv][debug] {'error': {'user_message': 'Page not found', 'message': '', 'reason': '', 'user_message_details': {}}}
[pixiv][error] NotFoundError: Requested resource (gallery/image) could not be found
[pixiv][debug]
Traceback (most recent call last):
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 152, in run
    for msg in extractor:
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\pixiv.py", line 75, in items
    work["comments"] = list(
                       ^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\pixiv.py", line 1286, in _pagination
    data = self._call(endpoint, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\pixiv.py", line 1274, in _call
    raise exception.NotFoundError()
gallery_dl.exception.NotFoundError: Requested resource (gallery/image) could not be found

The config file has comments and captions enabled, disabling comments allows extraction to proceed as normal:

[gallery-dl][debug] Version 1.28.5
[gallery-dl][debug] Python 3.11.4 - Windows-10-10.0.19044-SP0
[gallery-dl][debug] requests 2.32.3 - urllib3 2.0.4
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl\\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.pixiv.net/en/artworks/77553391'
[pixiv][debug] Using PixivWorkExtractor for 'https://www.pixiv.net/en/artworks/77553391'
[pixiv][debug] Loading cookies from '~/gallery-dl/cookies.txt'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): app-api.pixiv.net:443
[urllib3.connectionpool][debug] https://app-api.pixiv.net:443 "GET /v1/illust/detail?illust_id=77553391 HTTP/1.1" 200 398
[pixiv][debug] 77553391: https://s.pximg.net/common/images/limit_unviewable_360.png
[pixiv][warning] 77553391: 'limit_sanity_level' warning
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.pixiv.net:443
[urllib3.connectionpool][debug] https://www.pixiv.net:443 "GET /ajax/illust/77553391 HTTP/1.1" 200 3415
[pixiv][debug] Using download archive 'E:/Storage/gallery-dl/gallery-dl-archive.sqlite3'
[postprocessor.ugoira][debug] using mkvmerge demuxer
[postprocessor.ugoira][debug] using archive demuxer
[postprocessor.metadata][debug] Using metadata archive 'E:/Storage/gallery-dl/gallery-dl-metadata-archive.sqlite3'
[pixiv][debug] Active postprocessor modules: [UgoiraPP, UgoiraPP, MetadataPP]
# E:\Storage\gallery-dl\pixiv\147424 kissa-g\77553391_p0 のひめさん聖地巡礼.jpg
...
mikf added a commit that referenced this issue Feb 10, 2025
- wrap in try-except block
- do not attempt to fetch comments for 'sanity_level' works
@mikf
Copy link
Owner

mikf commented Feb 10, 2025

The exception is fixed (587205b), but fetching comments for limit_sanity_level works is not supported yet.

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

2 participants