mikf / gallery-dl

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

How to skip NotFoundError in Pixiv #6297

Open Seele0oO opened 1 week ago

Seele0oO commented 1 week ago
gallery-dl -c workspaces/gallery-dl-favorite-Pic.conf https://www.pixiv.net/users/1/bookmarks/artworks
pixiv: NotFoundError: Requested resource (gallery/image) could not be found

Some Pixiv Creator Delete their account or works.

How to skip these work?

espressoelf commented 5 days ago

I'm also running into this error, which stops the whole script instead of going on with the next image. This is related to the sanity_level problem (#4327). The breaking artwork is https://www.pixiv.net/artworks/118027546 in my case. It opens in the browser just fine. Checking the browsing history in the app, however, reveals the grey image we all know.

Also note that the submission is an Ugoira, so maybe that case isn't handled properly, yet. Debug output below, hope it helps.

[urllib3.connectionpool][debug] https://app-api.pixiv.net:443 "GET /v1/ugoira/metadata?illust_id=118027546 HTTP/11" 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 "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/job.py", line 151, in run
    for msg in extractor:
  File "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/extractor/pixiv.py", line 65, in items
    files = self._extract_files(work)
  File "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/extractor/pixiv.py", line 110, in _extract_files
    return self._extract_ugoira(work)
  File "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/extractor/pixiv.py", line 146, in _extract_ugoira
    ugoira = self.api.ugoira_metadata(work["id"])
  File "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/extractor/pixiv.py", line 1151, in ugoira_metadata
    return self._call("/v1/ugoira/metadata", params)["ugoira_metadata"]
  File "/opt/pypy/lib/pypy3.10/site-packages/gallery_dl/extractor/pixiv.py", line 1171, in _call
    raise exception.NotFoundError()
gallery_dl.exception.NotFoundError: Requested resource (gallery/image) could not be found