centos 安装百度云/百度网盘Python客户端

centos 6.5python版本为2.6的,这里我们先要安装python2.7

1、安装 sqlite-devel
#yum install sqlite-devel -y
2、安装 Python 2.7
#wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
#tar xf Python-2.7.8.tgz
#cd Python-2.7.8
#./configure --prefix=/usr/local
#make && make install

pip2.7安装百度云/百度网盘Python客户端

1、安装pip2.7
#wget https://bootstrap.pypa.io/get-pip.py
#/usr/local/bin/python2.7 get-pip.py  
2、安装百度云/百度网盘Python客户端
#pip2.7 install bypy

这样就安装好 linux下的百度云/百度网盘Python客户端

第一次实用会进行验证授权,如下:

#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

其它用法,如下

更详细的了解某一个命令:
#bypy help <command>
显示在云盘(程序的)根目录下文件列表:
#bypy list
把当前目录同步到云盘:

#bypy syncup  
或者
#bypy upload
把云盘内容同步到本地来:
#bypy syncdown
或者
#bypy downdir /
比较本地当前目录和云盘(程序的)根目录(个人认为非常有用):
#bypy compare

猜你喜欢

转载自blog.csdn.net/qq_18598403/article/details/83795749