在linux中安装BYPY来下载上传百度网盘文件

在linux下传文件是比较麻烦的一件事情,今天就利用python版的百度云盘/百度网盘在linux下玩耍

进行文件列表、下载、上传、比较、向上同步、向下同步,等操作

Github地址:https://github.com/houtianze/bypy

 

安装pip:

#CentOS 6.x 32位

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install -y python-pip

#CentOS 6.x 64位

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y python-pip

#CentOS 7.x

yum install -y epel-release
yum install -y python-pip

#如果CentOS 7安装出现No package python-pip available,可以用以下命令进行安装

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

#Debian/Ubuntu系统

apt-get -y update
apt-get -y install python-pip

安装pip3:

#CentOS系统

wget –no-check-certificate https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh

#Debian系统

wget –no-check-certificate https://www.moerats.com/usr/shell/Python3/Debian_Python3.6.sh && sh Debian_Python3.6.sh

然后安装的时候还报错了ERROR: The certificate of `www.moerats.com’ is not trusted.”

不得不用另外一条命令

apt-get install ca-certificates -y #Debian/Ubuntu

yum install ca-certificates -y #CentOS

#查看是否安装成功

pip3 -V

安装bypy

#pip安装

pip install bypy

#pip3安装

pip3 install bypy

等安装好之后,我们开始授权

执行命令

bypy info

然后会给一个链接,用浏览器打开,将授权码复制过来回车

以下是执行结果

root@:~# bypy info

Baidu PCS currently gives totally WRONG MD5 hash for remote files, and I AM NOT GOING TO ADAPT TO IT!
So it if doesn’t work, install version ‘1.6.10’ using the following command:
pip install bypy==1.6.10
Version 1.6.10 has a workaround for this.
### Seeking maintainer fo this `bypy` project, if you are interested, please create an issue at github, thanks. ###
—————————————————————-

Please visit:
https://openapi.baidu.com/o1uth/2.0/a2thorize?client_id=q8WE4EpCsau1oS0MplgMKNBn&response_type=code&redirect_uri=oob&scope=basic+netdisk
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done
028b67251f30e649a29f9dd0acf6fbd4
Authorizing, please be patient, it may take upto 300 seconds…
Authorizing with the Heroku server …
Heroku server failed, authorizing with the Heroku1 server …
Successfully authorized
Quota: 5.007TB
Used: 1.215TB

—————————————————————-

常用命令
显示文件列表:

bypy list

比较当前目录和网站根目录文件:

bypy compare

上传单个文件的命令如下:

bypy upload 文件名

把当前目录上传到云盘:

bypy syncup 目录地址

bypy upload 目录地址

下载单个文件的命令如下:

bypy downfile 下载文件名

把云盘内容下载到本地来:

bypy syncdown 目录地址

bypy downdir 目录地址

详细解释请运行bypy命令

上一篇 百度网盘新神器KinhDown不限速下载加速永无止境
下一篇 windows10电脑访问共享资源提示错误信息,你可能没有权限使用网络资源……的解决办法

投稿邮箱:
ivpsr888@gmail.com (投稿详情)

TG订阅频道:
t.me/ivpsr_news 网站最新内容推送

TG交流群:
(点击加入) 用户交流

文章列表
1
uqidc中秋促销VPS独立服务器年付815元,16核16GB内存、美国、香港机房
uqidc中秋促销VPS独立服务器年付815元,16核16GB内存、美国、香港机房
2
Akamai 预计新开的七个云核心计算区域
Akamai 预计新开的七个云核心计算区域
3
locvps全球云:澳大利亚VPS深度测评[2023],BGP+NTT线路,不限流量,测评数据分享
locvps全球云:澳大利亚VPS深度测评[2023],BGP+NTT线路,不限流量,测评数据分享
4
cloudcone洛杉矶SC2云服务器2折特惠年付$31,2G内存/3核/60G SSD/4T流量/1Gbps带宽
cloudcone洛杉矶SC2云服务器2折特惠年付$31,2G内存/3核/60G SSD/4T流量/1Gbps带宽
5
如何利用你的Chrome浏览器进行一个网页的超长的截图
如何利用你的Chrome浏览器进行一个网页的超长的截图
6
thegigabit怎么样?马来西亚机房简单测评,回程CN2线路,真实测评数据反馈
thegigabit怎么样?马来西亚机房简单测评,回程CN2线路,真实测评数据反馈
7
Kuroit英国特价VPS,£14.88/年起、单核、1GB、15GB SSD、2TB、10Gbps、英国机房
Kuroit英国特价VPS,£14.88/年起、单核、1GB、15GB SSD、2TB、10Gbps、英国机房
8
cloudnium美国VPS年付特惠9.99美元,2核2G内存、20G NVMe、2T流量、10Gbps带宽
cloudnium美国VPS年付特惠9.99美元,2核2G内存、20G NVMe、2T流量、10Gbps带宽
9
用什么注册TikTok账号比较好
用什么注册TikTok账号比较好
10
低价VPS商家Vmiss:低至11元/月,香港/韩国/日本/美国/英国机房,CN2/CUII/CMIN2/AS4837高速线路
低价VPS商家Vmiss:低至11元/月,香港/韩国/日本/美国/英国机房,CN2/CUII/CMIN2/AS4837高速线路