linux 下载百度网盘方法

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

1、安装bypy python库

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

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

3、在linux的服务器上执行

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

在这里插入图片描述

root@d499cdc38c9f:/# bypy info
Please visit:
https://openapi.baidu.com/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
  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值