linux服务器上传文件到百度云

一、安装bypy

pip install bypy --user

二、配置bypy

输入命令
bypy info
得到以下链接,复制到浏览器获取授权码
Please visit: 
https://openapi.baidu.com/oauth/2.0/authorize?scope=basic+netdisk&redirect_uri=oob&response_type=code&client_id=q8WE4EpCsau1oS0MplgMKNBn
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done
3eae4eexxxx4f3cde500cfa(从浏览器获取的授权码复制到这里)
Authorizing, please be patient, it may take upto 300 seconds...
Authorizing/refreshing with the OpenShift server ...
OpenShift server failed, authorizing/refreshing with the Heroku server ...
Successfully authorized
Quota: 1.005TB
Used: 882.675MB

三、使用bypy

bypy list                 # 显示文档
bypy -c                   # 取消令牌文件。一段时间后要重新授权
bypy upload filename -v   # 上传某文件,显示进度
bypy downdir filename     # 下载
bypy compare              # 比较本地目录和网盘目录

例如:

bypy upload incubator-mxnet.tar.gz -v

linux服务器上传文件到百度云