? Download manga from nhentai.net 一个含有语言过滤和智能去重功能的N站本子下载器
一个含有语言过滤和智能去重功能的 nhentai 本子下载器
对于轻度下载用户,推荐使用油猴脚本 nhentai-helper 作为替代
该项目的定位是下载器,而不是爬虫,我不推荐也不赞同使用该程序进行过量的下载,并且过量下载会导致出现验证码问题而无法继续下载
到 releases 下载对应平台(只有部分)的可执行文件
nhder.exe
并扔到C:\Windows\System32
中nhder
并扔到/usr/local/bin
中当然你也可以就直接放在非系统环境变量的目录中,只是调用麻烦点
版本更新的话重复上述操作即可
首先安装 Nodejs
# Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs
# Debian
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs
# Centos
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install nodejs -y
然后执行命令
npm i -g nhder
如果是 Windows 则在命令提示符或 PowerShell 中键入命令(后续同理)
版本更新的话也是执行上面这句命令即可
nhder --setting
将看到以下界面
nhder options
[1] Download path F:\nhentai # 下载目录
[2] Download thread 16 # 下载线程
[3] Analysis thread 5 # 解析线程
[4] Download timeout 30s # 下载超时
[5] Deduplication Enable # 去重功能
[6] Languages filter chinese, japanese # 语言过滤
[7] Proxy Disable # 代理设置
[0] Exit # 退出
Press a key [1...7 / 0]:
输入数字可进入对应设置项,首次下载之前必须设置下载目录
8
,最小为1
,最大为32
5
,最小为1
,最大为10
30
秒10
次则视作下载失败,此时线程编号会以红色标记,程序终止chinese,japanese
,如果页面中同时包含同一个本子的日语原本与汉化本,则优先下载汉化本,而如果顺序颠倒japanese,chinese
则下载日语原本<协议>://[用户名:密码@]<IP>:<端口>
,例如:
http://user:[email protected]:1080
socks://127.0.0.1:1080
(如果你使用小飞机则直接填这个,除非你改过本地端口)nhder https://nhentai.net/g/255771/
# 或
nhder 255771
# 默认会下载第一页
nhder https://nhentai.net/tag/lolicon/
nhder https://nhentai.net/search/?q=c94+chinese
# 如果你复制的链接是翻过页的,那么就会下载你翻到的那页,即由 page 字段来决定
# 注意,如果链接中带有 & 符号,在某些命令行中可能会出现错误,建议使用英文双引号包裹链接
nhder https://nhentai.net/tag/lolicon/?page=2
nhder "https://nhentai.net/search/?q=c94+chinese&page=2"
另外,你也可以使用-p
参数来对这种可翻页的页面指定下载全部或部分页面,此时会忽略链接中的 page 字段
格式为-p start:end
,表示下载 [start, end] 页数范围的所有本子;start 与 end 可以不填,此时默认 start 为 1,end 为最大页数;-p
与-p :
是一样的,但如果你直接使用-p
,则必须将其放到命令的最末端
# 下载 10~20页
nhder https://nhentai.net/tag/lolicon/ -p 10:20
# 下载 1~15页
nhder https://nhentai.net/tag/lolicon/ -p :15
# 下载 30页~最后
nhder https://nhentai.net/tag/lolicon/ -p 30:
# 下载全部
nhder https://nhentai.net/tag/lolicon/ -p
可以填入多个 URL 或 gid,程序会顺次下载
nhder 255771 256015 https://nhentai.net/tag/lolicon/ https://nhentai.net/search/?q=fgo
这时也可以使用上面提到的-p
参数,并且会对所有分类或搜索页的输入起效
touhou chinese
,而不是仅搜索touhou
然后依靠本程序的语言过滤,效率有天壤之别