linux绑定百度网盘与解绑

1、安装环境

系统环境:

Linux 系统 + Python 2.7

安装软件工具:

pip install requests
pip install bypy

可能出现问题:

linux绑定百度网盘与解绑_第1张图片

原因在于ImportError: 'module' object has no attribute 'check_specifier'

执行以下命令,更新一下setuptools

sudo pip install --upgrade setuptools==30.1.0

2、授权

[root@ineedle ~]# 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    # 提示在下边粘贴授权码

提示如下则绑定成功

bypy list             查看目录

bypy mkdir         新建目录

bypy upload       把本地当前目录下的文件同步到百度云盘

bypy downdir     把云盘上的内容同步到本地

bypy list #显示文档
bypy upload filename         上传文档
bypy downdir filename       下载文件(存在问题)
bypy compare                     比较本地当前目录和云盘(程序的)根目录
bypy -c                                取消令牌文件。一段时间后要重新授权

 

 

命令:bypy upload localfile cloudfile
3、解绑

在百度网盘页面解绑   https://passport.baidu.com/accountbind

你可能感兴趣的:(linux绑定百度网盘与解绑)