1 Star 4 Fork 0

masx200 / baidupcs-batch-upload

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

baidupcs-batch-upload

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

使用 baidupcs-go,百度网盘批量上传文件,高并发支持

在上传超过几百个文件时,速度快得多

给上传操作限流,防止打开过多报错,默认最多同时运行 15 个上传进程,可传参更多并发上传数

如果遇到 几 种网络问题上传失败,则自动重试,比直接用 一个 BaiduPCS-Go 命令上传更快

解决了上传文件有小概率上传未成功,但baidupcs-go返回上传成功的问题,

解决思路:使用upload上传完文件之后,使用meta命令,检查文件是否存在于网盘中,然后重传失败的文件

目前适配的版本

BaiduPCS-Go version v3.6.2

BaiduPCS-Go-v3.6.2-windows-x64

下载网址

https://github.com/masx200/baidupcs-batch-upload/releases/download/1.1.5/BaiduPCS-Go-v3.6.2-windows-x64.zip

https://github.com/felixonmars/BaiduPCS-Go/releases/tag/v3.6.2

https://github.com/masx200/baidupcs-batch-upload/releases/download/1.1.8/BaiduPCS-Go.arm64.android-v3.6.2-devel.rar

使用方法

安装

npm i -g @masx200/baidupcs-batch-upload

或者

yarn global add @masx200/baidupcs-batch-upload

安装 node_modules

yarn install

编译脚本

yarn build

运行脚本

yarn start

使用之前先登陆

BaiduPCS-Go login

获取 bduss 的方法

http://tool.cccyun.cc/tool/bduss/index3.html

https://bduss.lingtings.com/index3.html

命令行示例

必选参数 input:类型string,输入本地文件目录

必选参数 dest:类型string,上传到的网盘文件目录

可选参数concurrent:类型number,同时并发的上传文件个数


npx @masx200/baidupcs-batch-upload  --input=D:/baidupandownload/图片输入本地 --dest=/baidupandownload/图片输出网盘
npx @masx200/baidupcs-batch-upload --input=D:/baidupandownload/图片输入本地 --dest=/baidupandownload/图片输出网盘 --concurrent=20

对于 windows 系统,

如果是带空格的本地目录/网盘目录场景,

可以使用如下命令:


baidupcs-batch-upload.cmd --input="d:\2 2" --dest="/test/t s" --concurrent=20
MIT License Copyright (c) 2020 masx200 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

使用 baidupcs-go,百度网盘批量上传文件,高并发支持,在上传超过几百个文件时,速度快得多 展开 收起
JavaScript
MIT
取消

发行版 (2)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/masx200/baidupcs-batch-upload.git
git@gitee.com:masx200/baidupcs-batch-upload.git
masx200
baidupcs-batch-upload
baidupcs-batch-upload
master

搜索帮助