Skip to content

一个简单的支持多线程,断点续传及分布式的下载器

Notifications You must be signed in to change notification settings

duhd1993/downloader_cluster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#downloader_cluster

DESCRIPTION

一个简单的支持多线程,断点续传及分布式的下载器

INSTALL

ubuntu

    git clone https://github.com/ShichaoMa/downloader_cluster.git
    sudo python setup.py install

    or

    sudo pip install downloader-cluster

#USAGE

    ubuntu@dev:~$ downloader -h
    usage: downloader.py [-h] {start,reload} ...

    positional arguments:
      {start,reload}
        start         start download a file.
        reload        continue downlaod a file.

    optional arguments:
      -h, --help      how this help message and exit
    Command 'start'
    usage: downloader.py start [-h] [-s SETTINGS] -u URL [-f FILENAME]

    Command 'reload'
    usage: downloader.py reload [-h] [-s SETTINGS] -u URL [-f FILENAME]

##demo1

# 普通下载
        downloader start -u "https://download.jetbrains.8686c.com/python/pycharm-community-2016.2.tar.gz" -f  test.tar.gz
# 断点续传(服务器需要提供支持)
        downloader reload -u "https://download.jetbrains.8686c.com/python/pycharm-community-2016.2.tar.gz" -f  test.tar.gz

##demo2 分布式下载
向redis队列中发布下载任务
实现自定义分布式下载器
参见test.py

About

一个简单的支持多线程,断点续传及分布式的下载器

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%