linux使用bypy下载百度网盘文件

  1. 根据不同的环境安装python的pip
apt install python3-pip
  1. 安装bypy
 pip3 install bypy -i https://pypi.douban.com/simple
  1. 在网页上登录百度账号
  2. linux上执行,会出现授权地址,复制到浏览器,确认授权,复制授权码到linux
# bypy info
Please visit:
https://openapi.baidu.com/oauth/2.0/authorize?client_id=xxx&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
*********
Authorizing, please be patient, it may take upto 300 seconds...
Quota: 12.101TB
Used: 3.041TB
  1. linux登录网盘后,路径默认为 我的应用数据/bypy/
    在网页或客户端把需要下载的文件移动或复制到此目录下
##查看文件列表
# bypy list

##下载文件夹
# nohup bypy downdir 名称 > wget.log &
##下载文件
# nohup bypy downfile 1.mp4 ./ > wget.log & 

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

你可能感兴趣的:(linux,linux,运维,服务器)