先安装python环境

sudo apt-get install python-pip python-dev build-essential
sudo pip install requests

 

然后下载客户端

传送门

百度网盘bypy

解压,运行

./bypy list

首先他会要求你访问一个网址,需要你授权,授权后复制code给程序,如果没有报错,就可以看到你的同步目录了,你可以在网盘的我的应用数据文件夹里找到bypy文件夹,他就是应用目录了。

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
fcfc27e107cacdf8d4708b4e023b7acf
Authorizing, please be patient, it may take upto 60.0 seconds...
Authorizing with the GAE server ...
<E> [11:33:47] Maximum number (1) of tries failed.
I think you are WALLed, so let's authorize with the OpenShift server ...
Successfully authorized

 

如果你迫不及待的要测试,那就试试直接把当前目录上传至百度网盘

./bypy upload testfile
如果你想看到上传进度,请加入-v选项

./bypy -v upload testfile

下载速度测试

root@wangqinyang:/mnt/sync# bypy -v downfile snapshots.tar.gz ./
*WARNING*: Cannot detect the system encoding, assume it's 'UTF-8'
Token file: '/root/.bypy.json'
Hash Cache file: '/root/.bypy.pickle'
App root path at Baidu Yun '/apps/bypy'
sys.stdin.encoding = ASCII
sys.stdout.encoding = ASCII
Verbose level = 1
Debug = 0
----

Loading Hash Cache File '/root/.bypy.pickle'...
Hash Cache File loaded.
[===_________________] 16% (80.0MB/499.11MB) ETA: 14m14s (502KB/s, 2m43s gone)

速度可以达到500多K(4M电信)