Giter Site home page Giter Site logo

aliyundrive-uploader's Introduction

阿里云盘上传脚本

如有侵权,请联系我删除

禁止用于非法用途,违者后果自负

环境要求

  • python3

使用方法

安装

git clone https://github.com/Hidove/aliyundrive-uploader.git
cd aliyundrive-uploader
pip install -r requirements.txt

如果执行pip install时提示-bash: pip: command not found 就是pip命令没有安装,执行下方命令安装即可,然后再执行即可

wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
  • 重命名example.config.jsonconfig.json
  • 填写好config.json的内容

{
  "REFRESH_TOKEN": "refresh_token",
  "DRIVE_ID": "drive_id",
  "ROOT_PATH": "网盘目录",
  "FILE_PATH": "D:\\Pictures\\",
  "MULTITHREADING": false,
  "MAX_WORKERS": 5,
  "CHUNK_SIZE": 104857600
}
参数 注释
REFRESH_TOKEN 阿里云盘刷新的token
DRIVE_ID 阿里云盘驱动ID,目前不知道做何使用的,可能后续官方有新想法吧
ROOT_PATH 阿里云盘目录 我的照片
FILE_PATH 文件夹目录,填写绝对路径 D:\Pictures\
MULTITHREADING 是否启用多线程 true/false
MAX_WORKERS 线程池最大线程数,请根据自己机器填写 5
CHUNK_SIZE 分块上传大小,请根据自己机器填写,单位:字节 104857600
RESUME 断点续传,分块续传 true/false

运行

chmod +x main.py

多文件上传

python3 main.py
python3 main.py /www/wwwroot/download/

单文件上传

python3 main.py /www/lixiaoen.jpg

更新

cd ~/aliyundrive-uploader
git fetch --all 
git reset --hard origin/master 
git pull

文件解读

  • config.json
    • 脚本配置文件
  • task.json
    • 脚本上传任务记录文件
  • /log
    • 脚本执行记录

支持

觉得写得不错可以给我打赏哦

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.