Tsuk1ko / pxder

🖼 Download illusts from pixiv.net P站插画批量下载器
https://moe.best/projects/pxder.html
GNU General Public License v3.0
742 stars 78 forks source link

大批量的时候,解析会error #45

Closed GAted0 closed 2 years ago

GAted0 commented 4 years ago

图片数量少的时候没事,一旦超过3000就经常这样(只有一次成功解析了所有图片,大概12w张,但下载的时候出错) 报错

Collecting illusts of your bookmark
Progress:7559 {
    "error": {}
}

debug下

https://app-api.pixiv.net/v1/user/bookmarks/illust?user_id=***********&restrict=public&filter=for_ios&max_bookmark_id=*********4
Error: Request failed with status code 403
    at createError (C:\Users\****\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Users\****\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (C:\Users\****\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\adapters\http.js:236:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
{
    "message": "Request failed with status code 403",
    "config": {}
}
{
    "error": {}
}
GAted0 commented 4 years ago

希望可以加入分批下载,这样可能避免一次性过多

blackhole30 commented 4 years ago

同样遇到过报错,另外更新的时候遇到了错误(Mac) Unexpected end of JSON input while parsing near '...js.org/semver/-/semve' 2020-08-10T09_05_41_758Z-debug.log 感谢~

Tsuk1ko commented 4 years ago

@blackhole30 可能网络不畅,自行使用淘宝之类的国内 npm 镜像源,或者尝试 yarn

blackhole30 commented 4 years ago

npm淘宝镜像装好了 2020-08-10T09_24_21_209Z-debug.log

blackhole30 commented 4 years ago

哦好了,刚刚忘给权限了,十分感谢!

blackhole30 commented 4 years ago

-f到目前为止都会遇到这个问题,只存了五张左右就会显示

events.js:287 throw er; // Unhandled 'error' event ^

Error: ENOENT: no such file or directory, open '/Users/x/Library/Application Support/pxder/tmp/(307618XX)XXX.png' Emitted 'error' event on WriteStream instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at WriteStream.onerror (_stream_readable.js:729:7) at WriteStream.emit (events.js:310:20) at /usr/local/lib/node_modules/pxder/node_modules/graceful-fs/graceful-fs.js:303:14 at /usr/local/lib/node_modules/pxder/node_modules/graceful-fs/graceful-fs.js:333:16 at FSReqCallback.oncomplete (fs.js:155:23) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/Users/x/Library/Application Support/pxder/tmp/(307618XX)XXXX.png' }

-U到目前为止都会会在第123个画师的时候跳出

{ "error": {} }

blackhole30 commented 4 years ago

Progress: 0 Failed to get ugoira meta data . If you get a rate limit error, please use --no-ugoira-meta argument to avoid it. { error: { user_message: '', message: 'Rate Limit', reason: '', user_message_details: {} } }

{ "error": {} }

windows系统。另外--debug显示missing argument。-f经常在下完两位画师之后停在下载,然后就不动了。 image

Tsuk1ko commented 3 years ago

尝试处理了 rate limit 错误,今后遇到速率限制会暂停 10 分钟再继续下载

大批量解析的错误不太好办。我也只能简单的加了重试机制,这个 403 错误不知道具体原因,因为很早写的这个下载器,存在挺多设计不合理的地方,如今我也不好处理这类错误,建议还是不要用来下载超大量的收藏

TenviLi commented 3 years ago

+1, make me confused

image

TenviLi commented 3 years ago

+1, make me confused image

这个不是 rate limit 错误

和楼主的问题相同啊,在 debug

我觉得可以暂时跳过某次 403 请求 最后再尝试请求

或者假如出现错误,可以先暂存本次获取结果,下次启动 pxder 沿用上次的获取结果

Tsuk1ko commented 3 years ago

@gylidian 看上去你这个是不是第一次请求就 403 了…… Progress 都没出来

由于架构问题现在的下载模式已经不好改了,以前设计的太粗糙了,要解决现存这些问题只能整个重写

但我自己都已经不用 pxder 了,所以我是不可能去花精力重写的