BaiduPCS-Web
浏览 15852 | 评论 46 | 字数 1380
卖女孩的小火柴 - 搬砖中
2020年05月06日

看心情维护...

注意: 本人不对本程序承担任何责任,也不接受任何形式的赞助或赞赏,更不会以此牟利或分享用户数据。目前已经基本去除程序中和第三方服务器交互的部分,因此无法在线更新和推送消息,如有更新需要请watch

更新介绍

  1. 修复无法获取验证码导致无法登录的问题
  2. 修复BDUSS登录时无法处理异常信息
  3. 下载在无下载参数情况下(分享下载/locate下载/默认下载),默认使用locate方式下载,以获取更高的速度,非SVIP会员注意可能触发限速。
  4. 修复刷新后无法获取原来的下载数据,目前会自动恢复下载列表
  5. 初步增加aria2下载功能,暂时只支持RPC-Secret验证
  6. 版本更新到3.7.1,关闭消息通知和在线更新功能

下载地址

https://github.com/Erope/BaiduPCS-Go/

Aria2下载功能

配置

--aria2, -a                      启用aria2下载,停用自带下载
--aria2url value, --au value     aria2的url (default: "http://localhost:6800/jsonrpc")
--aria2secret value, --as value  aria2-RPC的secret,默认为空

-a参数控制aria2是否开启,-au控制aria2-RPC的URL,-as控制aria2-RPC的令牌
注意,这个url是基于Baidu-PCS运行的主机而言的,并非基于客户端
开启后默认的下载列表会失效,请自行使用其他软件来控制下载
最高线程上限设置为了16线程,因为默认的Aria2的源码中写的就是16线程,超过会报错,建议仅使用4线程下载以防拉黑
如果不会配置Aria2,建议暂时还是不要尝试

例子:

./BaiduPCS-Go -a -au "http://10.0.0.1:6800/jsonrpc" -as "xxxxxxxxxxxxxxxxxxxxx"

欢迎讨论:

  1. 博客: www.shinenet.cn
  2. TG: https://t.me/ShineNet_Q
  3. 点个Star再走?

怎么一直没人加呢...

开发者看这里

  1. 仓库https://github.com/Erope/BaiduPCS-Go
  2. 不准备跟进iikira作者的更新,因为内核基本没变化,主要更新点都是下载引擎的,但我预备对接上Aria2然后放弃原下载引擎原作者已经删库
  3. 前端仓库编译好后放在后端仓库的 /internal/pcsweb/dist ,再使用build.sh进行编译,需要的环境可以在 https://github.com/iikira/BaiduPCS-Go/wiki/编译-交叉编译帮助 获取前端仓库已经删库
  4. 欢迎各位PR和提ISSUE
  5. 目前所有开发都在master分支(毕竟目前就我一个,人多了会考虑新分支)
本文作者:卖女孩的小火柴 - 搬砖中
本文链接:https://www.shinenet.cn/archives/131.html
最后修改时间:2020-09-18 15:26:45
本站未注明转载的文章均为原创,并采用 CC BY-NC-SA 4.0 授权协议,转载请注明来源,谢谢!
评论
如果可能,请填写真实邮箱,有回复会送至邮箱。请不要水评论,谢谢。
textsms
支持 Markdown 语法
email
link
评论列表
已有 46 条评论
juebanlin
2021-02-25 17:44
rice报错panic: could not locate box "dist",导致openwrt编译插件不能使用,修改下build.sh可以吧?# rice 打包静态资源
RicePack() {go get github.com/GeertJohan/go.rice go get github.com/GeertJohan/go.rice/rice export PATH=$GOPATH/bin:$PATH rice -i ./internal/pcsweb append --exec "$output/$1/$2"}
2021-02-25 19:25
@juebanlin 安装rice的过程不应该放入脚本中,应该在build之前就装好,不合适放入脚本中
Jack
2021-02-11 18:38
编译了3.7.4 arm64的,正常使用了几个月了。感谢大佬。但是最近WEB UI打不开了。下面是运行时的反馈:
打开浏览器, 输入 http://localhost:5299 查看效果
panic: could not locate box "dist"goroutine 1 [running]:
github.com/GeertJohan/go%2erice.MustFindBox(...) C:/Users/Administrator/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:110github.com/Erope/BaiduPCS-Go/internal/pcsweb.StartServer(0x14b3, 0x4000182001, 0x7041b4, 0x3b) D:/Desktop/BaiduPCS-Go-3.7.4/BaiduPCS-Go-3.7.4/internal/pcsweb/pcsweb.go:27 +0xd58main.main.func1(0x40001bcf20) D:/Desktop/BaiduPCS-Go-3.7.4/BaiduPCS-Go-3.7.4/main.go:166 +0x7cgithub.com/urfave/cli.HandleAction(0x5e96a0, 0x7150c0, 0x40001bcf20, 0x40001bcf20, 0x0) C:/Users/Administrator/go/pkg/mod/github.com/urfave/[email protected]/app.go:528 +0x5cgithub.com/urfave/cli.(*App).Run(0x4000216700, 0x400018a010, 0x1, 0x1, 0x0, 0x0) C:/Users/Administrator/go/pkg/mod/github.com/urfave/[email protected]/app.go:288 +0x458main.main() D:/Desktop/BaiduPCS-Go-3.7.4/BaiduPCS-Go-3.7.4/main.go:1372 +0x3a08求解
2021-02-13 17:22
@Jack 最近打不开了? 这个是静态资源缺失,你看看是不是rice打包错误
mh
2021-01-15 19:15
首先感谢大佬,大佬的web版本用了半年了,在arm机器上太好用了 ,3.7.3版,最近心血来潮,调用aria2下载,aria2成功接收到下载请求,但无法下载,是传递到aria2的下载地址已经失效了?
2021-01-16 11:32
@mh 倒不是下载地址失效 应该说百度做了限制
2021-01-16 11:33
@mh 也有其他方法绕过去 假期我看看能不能整吧
mh
2021-01-17 15:13
@卖女孩的小火柴 期待大佬的新版本
2022-02-24 20:50
@mh 已经弄好了 现在没问题了
mh
2022-02-24 21:07
@卖女孩的小火柴 - 考研中 大佬牛逼,现在还在维护这个项目,等活干完了赶紧体验一下大佬的新版本 ?
max
2020-12-31 09:16
编译3.7.3版本只能本机使用,其他机器使用web页面打不开系统提示index.html,应该是rice链接静态资源出了问题,原项目关于编译的资料都没了,大佬能否发编译的相关资料到我邮箱,第一次接触golang,网上找了很久也没有找到解决办法。。。
2020-12-31 11:40
@max 不应该啊...rice链接的时候有报错吗?
原项目关于编译的资料应该没人保存下来,原来是放在wiki里面的
max
2020-12-31 13:15
@卖女孩的小火柴 用build.sh没有报错,go build后得到文件再使用build.sh里的rice命令链接也没有报错,我的系统是windows10 x64,golang版本1.5,编译过程是go get -u -v github.com/Erope/BaiduPCS-Gogo get -u -v github.com/GeertJohan/go.ricego get -u -v github.com/GeertJohan/go.rice/rice再用git bash here执行build.sh,cmd里添加了zip命令,大佬看这个过程是否有问题
max
2020-12-31 13:24
@卖女孩的小火柴 golang版本是1.15.6,官网上最新的稳定版
2020-12-31 14:32
@max 看起来确实没有什么问题...
zip指令只是为了打包缩小体积使用,有没有都可以
修改后的这部分代码没有在windows下编译过,我都是在Mac编译的,但毕竟是Go,确实不太应该...
其他机器打开的时候错误代码能发来看一下吗
max
2020-12-31 14:42
@卖女孩的小火柴 root@N1-SY:/sharedfolders/disk1# ./BaiduPCS-Go
打开浏览器, 输入 http://localhost:5299 查看效果
2020/12/31 14:41:00 http: panic serving 10.8.0.2:48972: open index.html: file does not exist
goroutine 21 [running]:
net/http.(*conn).serve.func1(0x40000b1ae0) C:/Go/src/net/http/server.go:1801 +0xfcpanic(0x632e00, 0x4000a664e0) C:/Go/src/runtime/panic.go:975 +0x420github.com/GeertJohan/go%2erice.(*Box).MustString(...) C:/Users/admin/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:331github.com/Erope/BaiduPCS-Go/internal/pcsweb.boxTmplParse(0x6df99b, 0x5, 0x40004f6ad8, 0x1, 0x1, 0xcd800) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/utils.go:80 +0xe0github.com/Erope/BaiduPCS-Go/internal/pcsweb.indexPage(0x7bc7e0, 0x40000fc380, 0x40001d4e00) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/pcsweb.go:67 +0x6cgithub.com/Erope/BaiduPCS-Go/internal/pcsweb.rootMiddleware(0x7bc7e0, 0x40000fc380, 0x40001d4e00) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/middleware.go:59 +0x150net/http.HandlerFunc.ServeHTTP(0x713eb0, 0x7bc7e0, 0x40000fc380, 0x40001d4e00) C:/Go/src/net/http/server.go:2042 +0x40net/http.(*ServeMux).ServeHTTP(0xba9a80, 0x7bc7e0, 0x40000fc380, 0x40001d4e00) C:/Go/src/net/http/server.go:2417 +0x190net/http.serverHandler.ServeHTTP(0x40000fc2a0, 0x7bc7e0, 0x40000fc380, 0x40001d4e00) C:/Go/src/net/http/server.go:2843 +0xbcnet/http.(*conn).serve(0x40000b1ae0, 0x7beba0, 0x4000a1af80) C:/Go/src/net/http/server.go:1925 +0x6f4created by net/http.(*Server).Serve C:/Go/src/net/http/server.go:2969 +0x2e82020/12/31 14:41:01 http: panic serving 10.8.0.2:48974: open index.html: file does not exist
goroutine 5 [running]:
net/http.(*conn).serve.func1(0x4000132000) C:/Go/src/net/http/server.go:1801 +0xfcpanic(0x632e00, 0x4000b00390) C:/Go/src/runtime/panic.go:975 +0x420github.com/GeertJohan/go%2erice.(*Box).MustString(...) C:/Users/admin/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:331github.com/Erope/BaiduPCS-Go/internal/pcsweb.boxTmplParse(0x6df99b, 0x5, 0x40004faad8, 0x1, 0x1, 0xcd800) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/utils.go:80 +0xe0github.com/Erope/BaiduPCS-Go/internal/pcsweb.indexPage(0x7bc7e0, 0x4000b1a000, 0x4000b08000) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/pcsweb.go:67 +0x6cgithub.com/Erope/BaiduPCS-Go/internal/pcsweb.rootMiddleware(0x7bc7e0, 0x4000b1a000, 0x4000b08000) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/middleware.go:59 +0x150net/http.HandlerFunc.ServeHTTP(0x713eb0, 0x7bc7e0, 0x4000b1a000, 0x4000b08000) C:/Go/src/net/http/server.go:2042 +0x40net/http.(*ServeMux).ServeHTTP(0xba9a80, 0x7bc7e0, 0x4000b1a000, 0x4000b08000) C:/Go/src/net/http/server.go:2417 +0x190net/http.serverHandler.ServeHTTP(0x40000fc2a0, 0x7bc7e0, 0x4000b1a000, 0x4000b08000) C:/Go/src/net/http/server.go:2843 +0xbcnet/http.(*conn).serve(0x4000132000, 0x7beba0, 0x4000b02000) C:/Go/src/net/http/server.go:1925 +0x6f4created by net/http.(*Server).Serve C:/Go/src/net/http/server.go:2969 +0x2e82020/12/31 14:41:01 http: panic serving 10.8.0.2:48980: open index.html: file does not exist
goroutine 23 [running]:
net/http.(*conn).serve.func1(0x40000b1b80) C:/Go/src/net/http/server.go:1801 +0xfcpanic(0x632e00, 0x4000b00720) C:/Go/src/runtime/panic.go:975 +0x420github.com/GeertJohan/go%2erice.(*Box).MustString(...) C:/Users/admin/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:331github.com/Erope/BaiduPCS-Go/internal/pcsweb.boxTmplParse(0x6df99b, 0x5, 0x40004faad8, 0x1, 0x1, 0xcd800) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/utils.go:80 +0xe0github.com/Erope/BaiduPCS-Go/internal/pcsweb.indexPage(0x7bc7e0, 0x4000b1a0e0, 0x4000b08100) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/pcsweb.go:67 +0x6cgithub.com/Erope/BaiduPCS-Go/internal/pcsweb.rootMiddleware(0x7bc7e0, 0x4000b1a0e0, 0x4000b08100) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/middleware.go:59 +0x150net/http.HandlerFunc.ServeHTTP(0x713eb0, 0x7bc7e0, 0x4000b1a0e0, 0x4000b08100) C:/Go/src/net/http/server.go:2042 +0x40net/http.(*ServeMux).ServeHTTP(0xba9a80, 0x7bc7e0, 0x4000b1a0e0, 0x4000b08100) C:/Go/src/net/http/server.go:2417 +0x190net/http.serverHandler.ServeHTTP(0x40000fc2a0, 0x7bc7e0, 0x4000b1a0e0, 0x4000b08100) C:/Go/src/net/http/server.go:2843 +0xbcnet/http.(*conn).serve(0x40000b1b80, 0x7beba0, 0x4000b021c0) C:/Go/src/net/http/server.go:1925 +0x6f4created by net/http.(*Server).Serve C:/Go/src/net/http/server.go:2969 +0x2e82020/12/31 14:41:01 http: panic serving 10.8.0.2:48982: open index.html: file does not exist
goroutine 37 [running]:
net/http.(*conn).serve.func1(0x4000b0c140) C:/Go/src/net/http/server.go:1801 +0xfcpanic(0x632e00, 0x4000b8a390) C:/Go/src/runtime/panic.go:975 +0x420github.com/GeertJohan/go%2erice.(*Box).MustString(...) C:/Users/admin/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:331github.com/Erope/BaiduPCS-Go/internal/pcsweb.boxTmplParse(0x6df99b, 0x5, 0x4000b84ad8, 0x1, 0x1, 0xcd800) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/utils.go:80 +0xe0github.com/Erope/BaiduPCS-Go/internal/pcsweb.indexPage(0x7bc7e0, 0x4000ba6000, 0x4000b92000) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/pcsweb.go:67 +0x6cgithub.com/Erope/BaiduPCS-Go/internal/pcsweb.rootMiddleware(0x7bc7e0, 0x4000ba6000, 0x4000b92000) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/middleware.go:59 +0x150net/http.HandlerFunc.ServeHTTP(0x713eb0, 0x7bc7e0, 0x4000ba6000, 0x4000b92000) C:/Go/src/net/http/server.go:2042 +0x40net/http.(*ServeMux).ServeHTTP(0xba9a80, 0x7bc7e0, 0x4000ba6000, 0x4000b92000) C:/Go/src/net/http/server.go:2417 +0x190net/http.serverHandler.ServeHTTP(0x40000fc2a0, 0x7bc7e0, 0x4000ba6000, 0x4000b92000) C:/Go/src/net/http/server.go:2843 +0xbcnet/http.(*conn).serve(0x4000b0c140, 0x7beba0, 0x4000b8c000) C:/Go/src/net/http/server.go:1925 +0x6f4created by net/http.(*Server).Serve C:/Go/src/net/http/server.go:2969 +0x2e82020/12/31 14:41:06 http: panic serving 10.8.0.2:48994: open index.html: file does not exist
goroutine 24 [running]:
net/http.(*conn).serve.func1(0x40000b1c20) C:/Go/src/net/http/server.go:1801 +0xfcpanic(0x632e00, 0x4000b8a720) C:/Go/src/runtime/panic.go:975 +0x420github.com/GeertJohan/go%2erice.(*Box).MustString(...) C:/Users/admin/go/pkg/mod/github.com/!geert!johan/[email protected]/box.go:331github.com/Erope/BaiduPCS-Go/internal/pcsweb.boxTmplParse(0x6df99b, 0x5, 0x4000b84ad8, 0x1, 0x1, 0xcd800) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/utils.go:80 +0xe0github.com/Erope/BaiduPCS-Go/internal/pcsweb.indexPage(0x7bc7e0, 0x4000ba60e0, 0x4000b92100) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/pcsweb.go:67 +0x6cgithub.com/Erope/BaiduPCS-Go/internal/pcsweb.rootMiddleware(0x7bc7e0, 0x4000ba60e0, 0x4000b92100) C:/Users/admin/go/src/github.com/Erope/BaiduPCS-Go/internal/pcsweb/middleware.go:59 +0x150net/http.HandlerFunc.ServeHTTP(0x713eb0, 0x7bc7e0, 0x4000ba60e0, 0x4000b92100) C:/Go/src/net/http/server.go:2042 +0x40net/http.(*ServeMux).ServeHTTP(0xba9a80, 0x7bc7e0, 0x4000ba60e0, 0x4000b92100) C:/Go/src/net/http/server.go:2417 +0x190net/http.serverHandler.ServeHTTP(0x40000fc2a0, 0x7bc7e0, 0x4000ba60e0, 0x4000b92100) C:/Go/src/net/http/server.go:2843 +0xbcnet/http.(*conn).serve(0x40000b1c20, 0x7beba0, 0x4000b8c1c0) C:/Go/src/net/http/server.go:1925 +0x6f4created by net/http.(*Server).Serve C:/Go/src/net/http/server.go:2969 +0x2e8
2020-12-31 14:47
@max 这还真是rice没打包进去...
问题不大 我发一份到你邮箱吧
max
2020-12-31 16:45
@卖女孩的小火柴 谢谢,已收到,不过能不能再发我linux amd和linux arm64的,我主要还是放开发板上用。另外我推测这个问题是因为编译的时候调用了除internal/pcsweb外的内容但是打包是只打了pcsweb,可能和gomod有关,关了gomod编译提示internal\pcsweb\download.go:319:41: cannot use Aria2_prefix + rawDlinks[0].String() (type string) as type []string in argument to rpcc.AddURI
2020-12-31 16:47
@max 那你加一下Tg群吧 https://t.me/ShineNet_Q
leo
2020-12-04 12:42
我能够成功编译出来,但是放在路由器里显示illegal instructions,经查询,原因是路由器不支持soft float, 所以需要在go语言编译的时候用soft float的方式编译,但是我看你的源代码里的build.sh在编译的时候原本就已经是用soft float的方式编译的,我编译出来还是这个提示,想问问是否有什么办法能够解决?请楼主帮助看看,谢谢
2020-12-05 20:15
@leo 请检查: goversioninfo RicePack