当前位置:   article > 正文

linux 下载百度网盘方法_linux系统下载百度网盘文件

linux系统下载百度网盘文件

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

1、安装bypy python库

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

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/589038
推荐阅读
相关标签
  

闽ICP备14008679号