admin管理员组

文章数量:1549930

linux 使用bypy下载百度网盘方法

1、安装bypy python库

pip install bypy -i https://pypi.douban/simple

2、在网页上登陆百度云账号
忽略

3、在linux的服务器上执行

执行完bypy info后,将网址复制到浏览器访问,确认授权,复制授权码到命令行,登入百度网盘。

root@d499cdc38c9f:/# bypy info
Please visit:
https://openapi.baidu/oauth/2.0/authorize?client_id=q8W1oS0MplgMKNBn&response_type=code&redirect_uri=oob&scope=basic+netdisk
And authorize this app
Paste the Authorization Code here within 10 minutes.
Press [Enter] when you are done
6af5fa9faaf3f0e2daa51f80f5d2a
Authorizing, please be patient, it may take upto 300 seconds...
Quota: 17.103TB
Used: 3.041TB

4、查看及下载数据

bypy登陆网盘后,路径为网盘的:我的应用数据/bypy/,需要将下载的文件或者文件夹移动到该文件夹。

##查看文件列表
root@d499cdc38c9f:/# bypy list
/apps/bypy ($t $f $s $m $d):
D test 0 2022-12-09, 06:17:42

##下载文件夹
root@d499cdc38c9f:/# nohup bypy downdir test > wget.log &
[3] 55225
root@d499cdc38c9f:/# nohup: ignoring input and redirecting stderr to stdout

root@d499cdc38c9f:/# tail -f wget.log
[____________________] 4% (460.0MB/10.0GB)

##其他上传下载命令
#上传文件到百度网盘
bypy upload [localpath] [remotepath] [ondup] 
bypy syncup [localdir] [remotedir] [deleteremote] 
#从百度网盘下载单个文件
bypy downfile <remotefile> [localpath] 
#从百度网盘下载整个文件夹
bypy downdir [remotedir] [localdir]
##退出登陆
bypy -c

本文标签: 方法百度网Linux