Linux命令行上传文件到百度网盘

2017-10-09  本文已影响753人  YuWenHaiBo
pip install requests
pip install bypy
[root@yu~]# 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    # 提示在下边粘贴授权码

在下边图示位置粘贴授权码,耐心等待一会即可(1-2分钟)

Press [Enter] when you are done
a288f3d775fa905a6911692a0808f6a8
Authorizing, please be patient, it may take upto None seconds...
Authorizing/refreshing with the OpenShift server ...
OpenShift server failed, authorizing/refreshing with the xx server ...
Successfully authorized
Quota: 2.015TB
Used: 740.493GB

授权成功。

测试上传和同步本地文件到云盘
由于百度PCS API权限限制,程序只能存取百度云端/apps/bypy目录下面的文件和目录。我们可以通过:

[root@yu~]# bypy list
/apps/bypy ($t $f $s $m $d):
上一篇下一篇

猜你喜欢

热点阅读