一.环境:
centos release 6.9
python 2.7.13
二.安装工具bypy
sudo pip install bypy
三.使用bypy
3.1 授权
[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
用浏览器访问加重颜色的链接获取授权码,然后粘贴再回车就授权成功.
3.2 上传文件
bypy upload (在某个文件夹下就会将文件夹下的内容全部上传到云端)
3.3 下载文件
bypy downdir