Git Product home page Git Product logo

pxder's Introduction

pixiv downloader

由于 Pixiv 已不再支持客户端的登录 API,请更新到 v2.12.0 及以后的版本以使用新的登录方式(详见下文)

本项目因本人不再使用且摸了而进入仅维护状态,暂不考虑任何非必要的 Feature Request

运行示例

简单写下说明(主要针对 Windows 用户)

准备

首先你需要先安装 Node.js >= 16

Windows / Mac

打开官网 => 下载左边的 LTS 版本 => 安装一路确定

Linux

# Ubuntu
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

# Debian
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs

# Centos
curl -sL https://rpm.nodesource.com/setup_16.x | bash -
yum install -y nodejs

安装/更新/卸载

Windows 打开“命令提示符”或者“Powershell”,执行下面的命令,即可安装或者更新(注:后续命令皆为在此执行)

npm i -g pxder

如需卸载,执行

npm uninstall -g pxder

配置

不同计算机用户的数据是独立储存的,互不影响

登录

pxder --login

Windows

正常情况下应该会自动弹出浏览器访问一个登录授权页面,如果没有的话请手动打开“Login URL”,操作下去即可

登录成功时浏览器会弹出如下图所示的一个对话框,选择“打开”即可,这时 pxder 应该会显示登录成功

打开应用

如果你的体验与上述情况不一致,请使用 pxder --login --no-protocol 命令进行登录,并参考下面的“其他系统”部分进行操作

其他系统

正常情况下应该会自动弹出浏览器访问一个登录授权页面,如果没有的话请手动打开“Login URL”,不要急着登录或授权,按以下步骤操作:

  1. 按下 F12 打开“开发者工具”,切换到“Network”选项卡,勾选“Preserve log”
  2. 进行登录或授权操作,最终会进入一个空白页面
  3. 点击“Doc”进行筛选,找到(一般是)最后一个请求,将 code 参数复制出来,粘贴到程序中并回车

以上步骤尽量快速完成,太慢的话验证可能会过期

开发者工具

登出

pxder --logout

仅会删除计算机当前用户储存的 refresh token,在其他计算机或用户上登录的不受影响

登录态复制

如果你有一个已经登陆了的 pxder,那么你可以通过以下步骤将登录态复制到另一个 pxder 上

  1. 在已经登录了的设备上执行 pxder --export-token,保存好该 token
  2. 在另一个设备上执行 pxder --login TOKEN,将 TOKEN 替换成上一步输出的 token

设置

进入 Pxder 的设置界面

pxder --setting

有六项设置,按下数字键选择一项进行设置

[1] Download path           # 下载目录,必须设置
[2] Download thread         # 下载线程数
[3] Download timeout        # 下载超时
[4] Auto rename             # 自动重命名(文件夹)
[5] Proxy                   # 使用代理
  • 下载目录
    请注意相对路径与绝对路径的区别,不过不用担心,输入完路径后会显示绝对路径以方便你检查
    目录无需手动建立,下载图片的时候会自动建立

  • 下载线程数
    即同时下载的图片数,默认为 5,最小为 1,最大为 32
    下载图片时最左侧的一列实际上就是线程编号

  • 下载超时及重试
    如果这么多秒之后一张图还没被下载完则算作超时,超时后会自动重试,默认值为30
    下载图片时如果线程编号是黄色底的就代表此次是重试
    重试超过 10 次则视作下载失败

  • 自动重命名
    开启了以后,例如这个画师原来叫 abc,今天你再次去下载(更新)他的画作,但是他改名叫 def 了,那么程序会自动帮你重命名画师文件夹

  • 使用代理
    支持使用 HTTP 或 SOCKS 代理,即可以使用小飞机
    输入格式为 <协议>://[用户名:密码@]<IP>:<端口>,例如:

    • http://user:[email protected]:1080
    • socks://127.0.0.1:1080(如果你使用小飞机则直接填这个,除非你改过本地端口)

    如果输入空行则会尝试从环境变量中依次读取 all_proxy https_proxy http_proxy(也包含全大写的环境变量)
    如果想完全禁止使用代理,请输入 disable

  • 直连模式
    利用域前置(Domain Fronting)绕过 SNI 审查,达到直连使用的目的
    直连模式不能和代理同时使用
    已被移除,不再维护,请使用其他工具代替,例如 Watt Toolkit

说明

  • 由于历史设计原因,pxder 在大批量下载方面比较无力且容易出错终止(主要受 API 限制),因此不建议使用 pxder 下载数量较大的已收藏作品,比较推荐其他以画师为单位下载的模式
  • 会将同一画师的作品下载在 (UID)画师名 格式的文件夹内,图片命名格式为 (PID)作品名
    并且,画师名会自动删除名字中 @(包含半角&全角)符号及以后的文字(因为这些基本上都是画师的摊位信息之类的与名字无关的信息)
  • 文件(夹)名均会过滤掉所有 Windows 和 Linux 中不能或不推荐做文件名的符号
  • 动图下下来会是所有帧的压缩包,并且会标注 delay 信息
    • 例如 [email protected] 表示该动图的播放速度为 30ms 一帧
    • 由于获取动图信息需要额外调用 API,因此如果动图较多将会使得解析时间较长,可以通过-M参数跳过解析
    • 目前没有自动转 gif / mp4 / webm 的功能,但在计划中,什么时候写看心情
  • 下载时会智能跳过已经下载完成的插画
  • 下载超时或网络错误会自动重试,重试上限为10次
    • 若状态码为 404 则直接放弃下载,这种大多是P站自身原因导致的图片问题
    • 如果当某一个线程达到重试上限并且此时有不止一个下载线程处于重试状态,程序将视为暂时出现了网络问题,暂停5分钟后会继续重试
    • 如果只有一个下载线程出现错误,视为不明原因错误,程序将会放弃下载该p并继续运行
  • 抗连接重置,解析时连接重置会自动重试

开始使用

如果需要终止程序,请在命令行中按下 Ctrl C 或者直接关闭命令行窗口

请不要吐槽为什么在 Windows 下 Ctrl C 后提示的 终止批处理操作吗(Y/N)? 不管是 Y 还是 N 都依然会终止,因为 Node 捕捉到 Ctrl C 就自己终止了,Windows 晚了一步(。

欲查看完整命令帮助请执行 pxder -h

(1) 下载或更新某画师的所有插画作品

使用 -u--uid 参数,后跟画师的 UID,可单个可多个,如果多个则用英文半角逗号隔开

pxder -u uid1,uid2,uid3,...

例如

pxder -u 5899479,724607,11597411

(2) 下载或更新你关注的所有画师的所有插画作品

该操作同时也会更新已下载的关注画师的作品,并且效率远高于 (3),比较推荐使用

会自动排除 pixiv事務局 (uid=11)

由于收集关注信息需时较久,因此特地针对该功能做了信息缓存:如果你在下载中途退出,那么下次使用该功能时并不需要重新收集,而是利用上次的缓存立即继续下载。

  • 公开关注与私密关注的缓存是分开的,互不干扰
  • 如果你需要强制重新收集画师信息(忽略上次的缓存),请在运行命令时加入 --force 参数

公开关注的画师

pxder -f
#
pxder --follow

私密关注的画师

pxder -F
#
pxder --follow--private

(3) 更新已下载的画师的画作

会对下载目录中检测到的所有下载过的画师的插画进行增量更新下载

与 (2) 的区别是可以更新你使用 (1) 下载了的但是未关注的画师的插画,但是效率远低于 (2)

pxder -U
#
pxder --update

(4) 下载或更新你的收藏中的插画作品

公开收藏

插画会被下载至 [bookmark] Public 文件夹中

pxder -b
#
pxder --bookmark

私密收藏

插画会被下载至 [bookmark] Private 文件夹中

pxder -B
#
pxder --bookmark--private

(5) 根据指定 PID 下载插画

插画会被下载至 PID 文件夹中

pxder -p pid1,pid2,pid3,...

例如

pxder -p 70593670,70594912,70595516

其他参数说明

  • -M--no-ugoira-meta
    下载动图时不请求其元数据,在下列情况下会有帮助
    1. 对动图的帧间隔信息无所谓,不请求可以节省大量解析时间
    2. 画师是专门画动图的,几百张动图解析起来实在是慢,并且动图太多可能导致达到 API 调用速率限制
  • --debug
    出错时输出详细的错误信息,如果你发现了 bug 想要提 issue,请尽量附上加了该参数时的错误日志
  • --output-config-dir
    输出 pxder 的配置存放路径

pxder's People

Contributors

oyami-srk avatar simon300000 avatar tsuk1ko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxder's Issues

Artist has made their work private.

Collecting illusts of your bookmark
Progress: 49783{ error:
   { user_message: 'Artist has made their work private.',
     message: '',
     reason: '',
     user_message_details: {} } }

请问遇到这种情况如何解决呢

用npm更新到最新版本2.8.6后使用pxder命令后报错

`pc3600@pc3600-ubuntu:~$ pxder
/usr/local/lib/node_modules/pxder/node_modules/fs-extra/lib/mkdirs/make-dir.js:86
} catch {
^

SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/pxder/node_modules/fs-extra/lib/mkdirs/index.js:3:44)`

分享一个批量转mp4的ps1脚本

7.22修改
屏蔽了7zip和ffmpeg的没暖用日志;
对特殊字符路径的情况进行处理;
增加了对构建失败时的判断。

因为pixiv的动图每张图片延迟信息可能并不一致,脚本会爬取动图帧数信息,调用ffmpeg生成和网页完全一致的mp4视频。
由于会使用脚本重新调用ugoira_meta接口,所以pxder 下载图片的时候可以加上 -M参数提高下载速度了(博主可以设置默认不获取动图数据 ,不然可能有小白到最后都不知道有这个参数 。。感觉我两年前提了一个伪需求。。。。。)

下载链接
pxder_zip2mp4_dev.txt

image

运行前需要把 7z 和 ffmpeg 配置到环境变量Path里面,下载txt文件,再把文件名后缀改成 .ps1, 通过powershell执行脚本 就可以把图片压缩包转成mp4

$pxder_path , $unzip_path 分别是存放zip文件的文件夹和解压图片并生成动图的文件夹,都可以自定义 , 如果路径里包含中文,需要把文件编码设置成utf-16 LE

参考:
https://ffmpeg.org/ffmpeg-formats.html#concat
https://trac.ffmpeg.org/wiki/Slideshow#Concatdemuxer

1

SS重复流量了

优化按画师下载

使用API请求关注画师的同时也会返回关注画师的若干最新画作,根据此直接进行文件存在检查来决定是否需要继续请求画师的画作,可以节省更新画师画作的时间以及API请求次数

重命名问题

Collecting illusts of 1/1924 uid 34452206 SG

Directory renamed: (34452206)Sg => (34452206)SG
{ Error: ENOTEMPTY: directory not empty, rename 'H:\Pixiv\(34452206)Sg' -> 'H:\Pixiv\(34452206)SG'
    at Object.renameSync (fs.js:616:3)
    at getIllustratorNewDir (D:\Git\pxder\src\downloader.js:284:7)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)
  errno: -4051,
  syscall: 'rename',
  code: 'ENOTEMPTY',
  path: 'H:\\Pixiv\\(34452206)Sg',
  dest: 'H:\\Pixiv\\(34452206)SG' }

Rate limit

抓作者(id:1699041)全部作品 进行到369项的时候出现了这个。

嗯……我猜大概是因为动图太多了?

如果我手动把他的作品一张一张存下来(比如我先定一个小目标,存他个90%的动图),放在相关目录里按规则命名之后,再启动脚本批量去扫图,还会出现这个错误么~

在设置界面复制粘贴文件夹路径的时候按错键了,现在只要输入pxder相关指令cmd就会原地闪现并消失……

对不起我太菜了!
setting界面复制文件夹路径按1准备粘贴的时候手抖又按倒ctrl+c了,然后弹出终止程序(选的N,虽然读过说明以后知道选不选都一样)
结果再想进设置界面的时候发现弹窗秒消失了,其他指令也一样。
重启以后状况没变,于是尝试了更新和重装……然后还是一样。
刚才清了一下windows临时文件也木大。
所以来咨询一下~

Windows 8.1 cmd 和 MINGW64 的显示问题

如题...

Microsoft Windows [版本 6.3.9600]
(c) 2013 Microsoft Corporation。保留所有权利。

C:\Users\Vanilla>pxder --setting
Pxder Options

[1] �[33mDownload path  �[39m�[41mNull, please set one�[49m
[2] �[33mDownload thread        �[39m5
[3] �[33mDownload timeout       �[39m30
[4] �[33mAuto rename            �[39mOff
[5] �[33mProxy          �[39mDisable
[0] �[45mExit�[49m

Press a key [1...5 / 0]:

大佬,菜鸡问一下登录不了咋办。。。。。用的梯子能在网页上P站的

C:\Users\Administrator>pxder --login

Pixiv Login

�[33mUsername: �[39m972705035
�[33mPassword: �[39m******
Error: connect ETIMEDOUT 66.220.152.28:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) {
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '66.220.152.28',
port: 443,
config: {
url: 'https://oauth.secure.pixiv.net/auth/token',
method: 'post',
data: 'client_id=KzEZED7aC0vird8jWyHM38mXjNTY&client_secret=W9JZoJe00qPvJsiy
CGT3CCtC6ZUtdpKpzMbNlUGP&get_secure_url=1&grant_type=password&username=972705035
&password=960214',
headers: {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/0.19.0',
'Content-Length': 165
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus]
},
request: Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
protocol: 'https:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/auth/token',
method: 'POST',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'oauth.secure.pixiv.net',
port: null,
nativeProtocols: [Object],
pathname: '/auth/token'
},
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 165,
_requestBodyBuffers: [ [Object] ],
_onNativeResponse: [Function],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /auth/token HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/x-www-form-urlencoded\r\n' +
'User-Agent: axios/0.19.0\r\n' +
'Content-Length: 165\r\n' +
'Host: oauth.secure.pixiv.net\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
path: '/auth/token',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: [Circular],
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object: null prototype]
},
_currentUrl: 'https://oauth.secure.pixiv.net/auth/token'
},
response: undefined,
isAxiosError: true,
toJSON: [Function]
}

遇到了相同的无法登陆问题

代理工具为clash 配置的默认http7890端口,setting中也设置正确了 但依旧显示login fail
debug代码与上一个issues出入不大
最后能在pixiv的登录记录中查询到这几次的记录,输入不正确的密码显示的login fali则不会被记录

使用Pid下载指定图片遇到重复项会报错

其实我这个角度有点刁钻2333.
事情是这样的,有一天我看到了一个画师的几个作品,想把它们下载下来。
输入几个id以后启动脚本,下到一半的时候我代理出了点问题,就退出去改了一下。
然后回来重新下载的时候还是用的上次的命令行(同一组id),那时候网又不是很好,然后从第一张就开始弹那种黄色的重试,我就一直等呀等呀等…………………………
等了两天以后我打开那个文件夹突然发现之前的图已经下好了呀,然后我才发现是被同样的任务卡住了。
嗯……就是过来留言提示一下,改不改都不要紧的2333,很感谢作者大大的脚本~

顺便请教一下,脚本缓存的动图压缩包用什么查看器会好一点呢~

求助, 无法登录

`C:\Users\Never>pxder --login

Pixiv Login

Username: Never
Password:
Error: Request failed with status code 400
at createError (C:\Users\Never\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\Never\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\Never\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\adapters\http.js:237:11)
at IncomingMessage.emit (events.js:208:15)
at endReadableNT (_stream_readable.js:1154:12)
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
config: {
url: 'https://oauth.secure.pixiv.net/auth/token',
method: 'post',
data: 'client_id=KzEZED7aC0vird8jWyHM38mXjNTY&client_secret=W9JZo233333JsiyCGT3CCtC6ZUtdpKpzMbNlUGP&get_secure_url=1&grant_type=password',
headers: {
Accept: 'application/json, text/plain, /',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'axios/0.19.0',
'Content-Length': 167
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus]
},
request: ClientRequest {
_events: [Object: null prototype] {
socket: [Function],
abort: [Function],
aborted: [Function],
error: [Function],
timeout: [Function],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'oauth.secure.pixiv.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'oauth.secure.pixiv.net',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 10,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'oauth.secure.pixiv.net',
alpnProtocol: false,
authorized: true,
authorizationError: null,
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 10,
connecting: false,
_hadError: false,
_parent: null,
_host: 'oauth.secure.pixiv.net',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: true,
parser: null,
_httpMessage: [Circular],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 10,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_header: 'POST /auth/token HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Content-Type: application/x-www-form-urlencoded\r\n' +
'User-Agent: axios/0.19.0\r\n' +
'Content-Length: 167\r\n' +
'Host: oauth.secure.pixiv.net\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object],
requests: {},
sockets: [Object],
freeSockets: {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
maxCachedSessions: 100,
_sessionCache: [Object]
},
socketPath: undefined,
method: 'POST',
path: '/auth/token',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [Circular],
responseUrl: 'https://oauth.secure.pixiv.net/auth/token',
redirects: []
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
_redirectable: Writable {
_writableState: [WritableState],
writable: true,
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 167,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest: [Circular],
_currentUrl: 'https://oauth.secure.pixiv.net/auth/token'
},
[Symbol(isCorked)]: false,
[Symbol(outHeadersKey)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array]
}
},
response: {
status: 400,
statusText: 'Bad Request',
headers: {
server: 'nginx',
date: 'Tue, 23 Jul 2019 15:04:53 GMT',
'content-type': 'application/json',
'content-length': '275',
connection: 'close',
'x-content-type-options': 'nosniff',
'strict-transport-security': 'max-age=31536000',
'x-frame-options': 'SAMEORIGIN'
},
config: {
url: 'https://oauth.secure.pixiv.net/auth/token',
method: 'post',
data: 'client_id=KzEZED7aC0vird8jWyHM38mXjNTY&client_secret=W9JZoJ23333CGT3CCtC6ZUtdpKpzMbNlUGP&get_secure_url=1&grant_type=password',
headers: [Object],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus]
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /auth/token HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +`

BUG:Windows 10环境下下载到网络磁盘报错

  • 类型:bug
  • 级别:中等(影响正常功能但可以避免
  • OS版本: Windows10 1909
  • 环境版本:Node.js12.18.1LTS
  • 操作方式:管理员模式运行的cmd命令提示符
  • 复现流程:
  1. 将一个网络磁盘映射为Z:
  2. 在程序里设置下载目录为: Z:\Images\pixiv,此时设置里是正常显示的(即显示为Z:\Images\pixiv)
  3. 执行下载命令时pxder -f 报错,目录变成了Z:\\Images\\pixiv,路径分隔符都变成了双斜杠,提示找不到文件夹
  • 期望的结果
    可以正常执行下载流程

  • 暂时的替代方式
    1.使用一个网络位置,即直接写为\\ip\Tower\Images\pixiv,这样可以正常下载

  • P.S.我现在无法附上截图因为我正在下载图片


希望作者可以检查一下这个问题

/usr/bin/env: "node\r": 没有那个文件或目录

如题...
执行 sudo npm i -g pxder 后,再执行 pxder 报错如下:

/usr/bin/env: "node\r": 没有那个文件或目录

系统为 XUbuntu 32位,nodejs 版本为 v8.10.0
nodejs 使用 apt 安装)

请问是怎么回事呢...
(PS:在 Windows 8.1 上完美运行)
谢谢!

pixiv 改用新的登录方式,旧方法已拉闸

https://oauth.secure.pixiv.net/auth/token
Error: Request failed with status code 400
    at createError (/home/runner/pxder/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/home/runner/pxder/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/home/runner/pxder/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
ERROR {
    "message": "Request failed with status code 400",
    "config": {}
}

Login fail! Please check your input or proxy setting.

{
  has_error: true,
  errors: {
    system: {
      message: 'Invalid grant_type parameter or parameter missing',
      code: 1508
    }
  },
  error: 'invalid_grant'
}
Done in 5.77s.

各大第三方 pixiv 客户端基本也翻车了,所以这个 issue 算是个提醒吧(

第二下载路径

感觉公开和私人还是分成两块来放比较好,不过每次 pxder --setting 去改路径再爬就很… 烦。

所以虽然不会 JS 但还是硬着头皮改了一个试试:Skimige@ff70d7c 看起来好像可以工作

感觉这个特性应该会有人需要的吧… & 依葫芦画瓢不到一小时画出来的东西所以可能会改出些错

大概长这个样子 ↓

image

顺便赞一下,爬取很稳定很迅速!反而是上传到云盘的话不知道要传多久了
(云盘同步什么的也挺麻烦的… 量太大了)

最后,希望天国的动图转视频(webm 好文明)支持有一天能成真 orz

关于多P图片下载命名问题

单个作品里面有多个分P的时候,特别是P数特别多的时候.下载下来的文件命名将会是
XXX_P0 XXX_P1 ... XXX_P9 XXX_P10 XXX_P11 ... XXX_Pxx
在某些图片浏览器(如XnView)里面,读取图片的顺序是0 1 11 12 ... 19 2 20 21 22 ... 非常不方便.
能否默认将多P图片用001 002 003 ... 这种加0的格式补齐P数呢?

Request failed with status code 400

我尝试过用SocksCap套着用并disabled proxy,也试过用http://127.0.0.1,都是返回400
QQ截图20191028012512

  • ss version: 4.1.7.1
  • config
[1] Download path       X:\Pictures\pixiv
[2] Download thread     5
[3] Download timeout    30
[4] Auto rename         On
[5] Proxy               socks://127.0.0.1:1080
[0] Exit
  • logs
{ Error: Request failed with status code 400
    at createError (C:\Users\user\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\createError.js:16:15)
    at settle (C:\Users\user\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\core\settle.js:17:12)
    at IncomingMessage.handleStreamEnd (C:\Users\user\AppData\Roaming\npm\node_modules\pxder\node_modules\axios\lib\adapters\http.js:237:11)
    at IncomingMessage.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1103:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  config:
   { url: 'https://oauth.secure.pixiv.net/auth/token',
     method: 'post',
     data:
      'client_id=KzEZED7aC0vird8jWyHM38mXjNTY&client_secret=W9JZoJe00qPvJsiyCGT3CCtC6ZUtdpKpzMbNlUGP&get_secure_url=1&include_policy=true&grant_type=password&username=username&password=password',
     headers:
      { Accept: 'application/json, text/plain, */*',
        'Content-Type': 'application/x-www-form-urlencoded',
        'App-OS': 'ios',
        'Accept-Language': 'en-us',
        'App-OS-Version': '12.0.1',
        'App-Version': '7.2.2',
        'User-Agent': 'PixivIOSApp/7.2.2 (iOS 12.0.1; iPhone8,2)',
        'X-Client-Time': '2019-10-27T17:34:38.938Z',
        'X-Client-Hash': '27a188e3af28f218197cc3379d6c4a65',
        'Content-Length': 205 },
     transformRequest: [ [Function: transformRequest] ],
     transformResponse: [ [Function: transformResponse] ],
     timeout: 0,
     adapter: [Function: httpAdapter],
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     validateStatus: [Function: validateStatus],
     httpsAgent:
      SocksProxyAgent {
        _events: [Object: null prototype] {},
        _eventsCount: 0,
        _maxListeners: undefined,
        _promisifiedCallback: true,
        timeout: null,
        options: [Url],
        proxy: [Object],
        callback: [Function] } },
  request:
   ClientRequest {
     _events:
      [Object: null prototype] {
        socket: [Function],
        abort: [Function],
        aborted: [Function],
        error: [Function],
        timeout: [Function],
        prefinish: [Function: requestOnPrefinish] },
     _eventsCount: 6,
     _maxListeners: undefined,
     output: [],
     outputEncodings: [],
     outputCallbacks: [],
     outputSize: 0,
     writable: true,
     _last: true,
     chunkedEncoding: false,
     shouldKeepAlive: false,
     useChunkedEncodingByDefault: true,
     sendDate: false,
     _removedConnection: false,
     _removedContLen: false,
     _removedTE: false,
     _contentLength: null,
     _hasBody: true,
     _trailer: '',
     finished: true,
     _headerSent: true,
     socket:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: 'oauth.secure.pixiv.net',
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 7,
        connecting: false,
        _hadError: false,
        _handle: [TLSWrap],
        _parent: [Socket],
        _host: null,
        _readableState: [ReadableState],
        readable: true,
        _maxListeners: undefined,
        _writableState: [WritableState],
        writable: false,
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: [TLSWrap],
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular],
        [Symbol(res)]: [TLSWrap],
        [Symbol(asyncId)]: 19,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: [Object] },
     connection:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: 'oauth.secure.pixiv.net',
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 7,
        connecting: false,
        _hadError: false,
        _handle: [TLSWrap],
        _parent: [Socket],
        _host: null,
        _readableState: [ReadableState],
        readable: true,
        _maxListeners: undefined,
        _writableState: [WritableState],
        writable: false,
        allowHalfOpen: false,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: [TLSWrap],
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Circular],
        [Symbol(res)]: [TLSWrap],
        [Symbol(asyncId)]: 19,
        [Symbol(lastWriteQueueSize)]: 0,
        [Symbol(timeout)]: null,
        [Symbol(kBytesRead)]: 0,
        [Symbol(kBytesWritten)]: 0,
        [Symbol(connect-options)]: [Object] },
     _header:
      'POST /auth/token HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nApp-OS: ios\r\nAccept-Language: en-us\r\nApp-OS-Version: 12.0.1\r\nApp-Version: 7.2.2\r\nUser-Agent: PixivIOSApp/7.2.2 (iOS 12.0.1; iPhone8,2)\r\nX-Client-Time: 2019-10-27T17:34:38.938Z\r\nX-Client-Hash: 27a188e3af28f218197cc3379d6c4a65\r\nContent-Length: 205\r\nHost: oauth.secure.pixiv.net:443\r\nConnection: close\r\n\r\n',
     _onPendingData: [Function: noopPendingOutput],
     agent:
      SocksProxyAgent {
        _events: [Object: null prototype] {},
        _eventsCount: 0,
        _maxListeners: undefined,
        _promisifiedCallback: true,
        timeout: null,
        options: [Url],
        proxy: [Object],
        callback: [Function] },
     socketPath: undefined,
     timeout: undefined,
     method: 'POST',
     path: '/auth/token',
     _ended: true,
     res:
      IncomingMessage {
        _readableState: [ReadableState],
        readable: false,
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        socket: [TLSSocket],
        connection: [TLSSocket],
        httpVersionMajor: 1,
        httpVersionMinor: 1,
        httpVersion: '1.1',
        complete: true,
        headers: [Object],
        rawHeaders: [Array],
        trailers: {},
        rawTrailers: [],
        aborted: false,
        upgrade: false,
        url: '',
        method: null,
        statusCode: 400,
        statusMessage: 'Bad Request',
        client: [TLSSocket],
        _consuming: false,
        _dumped: false,
        req: [Circular],
        responseUrl: 'https://oauth.secure.pixiv.net/auth/token',
        redirects: [] },
     aborted: undefined,
     timeoutCb: null,
     upgradeOrConnect: false,
     parser: null,
     maxHeadersCount: null,
     _redirectable:
      Writable {
        _writableState: [WritableState],
        writable: true,
        _events: [Object],
        _eventsCount: 2,
        _maxListeners: undefined,
        _options: [Object],
        _redirectCount: 0,
        _redirects: [],
        _requestBodyLength: 205,
        _requestBodyBuffers: [],
        _onNativeResponse: [Function],
        _currentRequest: [Circular],
        _currentUrl: 'https://oauth.secure.pixiv.net/auth/token' },
     [Symbol(isCorked)]: false,
     [Symbol(outHeadersKey)]:
      [Object: null prototype] {
        accept: [Array],
        'content-type': [Array],
        'app-os': [Array],
        'accept-language': [Array],
        'app-os-version': [Array],
        'app-version': [Array],
        'user-agent': [Array],
        'x-client-time': [Array],
        'x-client-hash': [Array],
        'content-length': [Array],
        host: [Array] } },
  response:
   { status: 400,
     statusText: 'Bad Request',
     headers:
      { server: 'nginx',
        date: 'Sun, 27 Oct 2019 17:34:38 GMT',
        'content-type': 'application/json',
        'content-length': '78',
        connection: 'close',
        'x-content-type-options': 'nosniff',
        'strict-transport-security': 'max-age=31536000',
        'x-frame-options': 'SAMEORIGIN' },
     config:
      { url: 'https://oauth.secure.pixiv.net/auth/token',
        method: 'post',
        data:
         'client_id=KzEZED7aC0vird8jWyHM38mXjNTY&client_secret=W9JZoJe00qPvJsiyCGT3CCtC6ZUtdpKpzMbNlUGP&get_secure_url=1&include_policy=true&grant_type=password&username=username&password=password',
        headers: [Object],
        transformRequest: [Array],
        transformResponse: [Array],
        timeout: 0,
        adapter: [Function: httpAdapter],
        xsrfCookieName: 'XSRF-TOKEN',
        xsrfHeaderName: 'X-XSRF-TOKEN',
        maxContentLength: -1,
        validateStatus: [Function: validateStatus],
        httpsAgent: [SocksProxyAgent] },
     request:
      ClientRequest {
        _events: [Object],
        _eventsCount: 6,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [TLSSocket],
        connection: [TLSSocket],
        _header:
         'POST /auth/token HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nApp-OS: ios\r\nAccept-Language: en-us\r\nApp-OS-Version: 12.0.1\r\nApp-Version: 7.2.2\r\nUser-Agent: PixivIOSApp/7.2.2 (iOS 12.0.1; iPhone8,2)\r\nX-Client-Time: 2019-10-27T17:34:38.938Z\r\nX-Client-Hash: 27a188e3af28f218197cc3379d6c4a65\r\nContent-Length: 205\r\nHost: oauth.secure.pixiv.net:443\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [SocksProxyAgent],
        socketPath: undefined,
        timeout: undefined,
        method: 'POST',
        path: '/auth/token',
        _ended: true,
        res: [IncomingMessage],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        _redirectable: [Writable],
        [Symbol(isCorked)]: false,
        [Symbol(outHeadersKey)]: [Object] },
     data: { has_error: true, errors: [Object] } },
  isAxiosError: true,
  toJSON: [Function] }

代理设置无效

image

使用的v2ray,系统已经设置代理,地址是http://127.0.0.1:8888。
可以从浏览器直接访问pixiv,但是使用相同的代理配置却无法使用pxder访问。
尝试给系统设置HOST,但是在使用ipconfig /flushdns后还是不能生效。
(上图是我的配置与尝试登陆的结果)
(我没有在qv2ray上看到有关于pixiv.net的连接日志)

pxder --update 时报错

RT

C:\Users\Vanilla>pxder --update

Download Path:  C:\Users\Vanilla\Pictures\Pixiv
Using Proxy:    http://127.0.0.1:1080

Collecting illusts of 1/2 uid 219976 p19 🐈

Collecting illusts of 2/2 uid 60306503
{ status: 404,
  statusText: 'Not Found',
  headers:
   { server: 'nginx',
     date: 'Wed, 21 Aug 2019 08:38:40 GMT',
     'content-type': 'application/json; charset=utf-8',
     'content-length': '127',
     connection: 'close',
     'x-userid': '18951070',
     vary: 'X-UserId',
     'x-content-type-options': 'nosniff',
     'strict-transport-security': 'max-age=31536000' },
  config:
   { url:
      'https://app-api.pixiv.net/v1/user/detail?user_id=60306503&filter=for_ios',
     headers:
      { Accept: 'application/json, text/plain, */*',
        'App-OS': 'ios',
        'Accept-Language': 'en-us',
        'App-OS-Version': '12.0.1',
        'App-Version': '7.2.2',
        'User-Agent': 'PixivIOSApp/7.2.2 (iOS 12.0.1; iPhone8,2)',
        Authorization: 'Bearer Egc3BeBEbVojJiT_6Dti2lvrBmlnVoY1xD5qek0Wnak' },
     transformRequest: [ [Function: transformRequest] ],
     transformResponse: [ [Function: transformResponse] ],
     timeout: 0,
     adapter: [Function: httpAdapter],
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     validateStatus: [Function: validateStatus],
     httpsAgent:
      HttpsProxyAgent {
        _events: [Object: null prototype] {},
        _eventsCount: 0,
        _maxListeners: undefined,
        _promisifiedCallback: true,
        timeout: null,
        options: [Url],
        secureProxy: false,
        proxy: [Object],
        defaultPort: 443,
        callback: [Function] },
     method: 'get',
     data: undefined },
  data:
   { error:
      { user_message: 'Work has been deleted or the ID does not exist.',
        message: '',
        reason: '',
        user_message_details: {} } } }

尝试将pxder封装成docker后,出现问题

使用docker的node:latest镜像创建容器并且在容器内登入pixiv并完成好各种设定之后,
在容器内的bash运行pxder来下载图片是没有问题的。

但是,

我尝试编写了以下的docker-compose.yml

version: "2"
services:
  pxder:
    image: luobogao/pxder:private
    container_name: pxder
    volumes:
      - ./images:/images
    command:
      - bash start.sh

将pxder相关的命令写入start.sh,内容是

pxder -f && pxder -F && pxder -b && pxder -B

然后 docker-compose up 运行容器之后,出现以下报错并退出

[root@myrrh pxder]# docker-compose up
Recreating pxder ... done
Attaching to pxder
pxder    | internal/modules/cjs/loader.js:775
pxder    |     throw err;
pxder    |     ^
pxder    | 
pxder    | Error: Cannot find module '/bash /start.sh'
pxder    |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
pxder    |     at Function.Module._load (internal/modules/cjs/loader.js:677:27)
pxder    |     at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
pxder    |     at internal/main/run_main_module.js:17:11 {
pxder    |   code: 'MODULE_NOT_FOUND',
pxder    |   requireStack: []
pxder    | }
pxder exited with code 1

我想请问一下这是node的锅还是docker的锅((((
如果这是node的锅的话,应该如何处理?

我对node不是很熟悉,还麻烦大佬帮忙瞧一下pwp

Request failed with status code 403

C:\Users\xxx>pxder -b

Download Path:  G:\pixiv
Using Proxy:    socks://127.0.0.1:1080

Collecting illusts of your bookmark
Progress: 18839Request failed with status code 403

大批量的时候,解析会error

图片数量少的时候没事,一旦超过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": {}
}

由于某些原因(网络爆炸)生成空 public.json 之后,下次运行会报错

SyntaxError: C:\Users\{username}\AppData\Roaming\pxder\public.json: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.Module._extensions..json (internal/modules/cjs/loader.js:742:27)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:659:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at PixivFunc.downloadFollowAll (D:\Git\pxder\src\index.js:326:20)
    at handleArgv.then (D:\Git\pxder\bin\pxder:78:16)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

configFile location

https://github.com/YKilin/pxder/blob/aca40d5200d95038dfb91e2eedee5e7896393c39/src/index.js#L19

这一行逻辑有点奇怪,可以存在appdata/~的

这样子在linux下会权限不足

fs.js:113
    throw err;
    ^

Error: EACCES: permission denied, open '/usr/lib/pxder.config.json'
    at Object.openSync (fs.js:434:3)
    at Object.writeFileSync (fs.js:1154:35)
    at Function.initConfig (/usr/lib/node_modules/pxder/src/index.js:37:7)
    at Function.readConfig (/usr/lib/node_modules/pxder/src/index.js:54:13)
    at Object.<anonymous> (/usr/lib/node_modules/pxder/bin/pxder:37:20)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

能不能在下载图片前加个对图片人气的判断

能不能在下载图片时对图片发布的时间或者人气、点击、浏览数做一个筛选,因为在批量下载单个画师的图片时,很多年代久远的图片,或者画师的早期不成熟的图片也会下载下来,导致下载下来的图片还需要进行大规模的删减。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.