Giter VIP home page Giter VIP logo

fastdownloader's Introduction

fastDownloader

A downloader developed for myself.(selfuse)

Usage

Install dependencies.

$ pip3 install -r requirements.txt

Check usage.

$ python3 main.py -h
usage: main.py [-h] [--src SRC] [--save SAVE] [--max MAX] [--interval INTERVAL] [--chunk CHUNK]

fastDownloader v0.0.1

options:
  -h, --help           show this help message and exit
  --src SRC            This parameter specifies the file path where the links to be downloaded are stored.
  --save SAVE          This parameter specifies the path for storing the downloaded files. No / at the end.
  --max MAX            This parameter specifies the concurrency level.
  --interval INTERVAL  This parameter specifies the interval of requests.
  --chunk CHUNK        This parameter specifies the number of bytes to be read per download.

Src file should be like ๐Ÿ‘‡๐Ÿป

["url1","url2"...]

Example

Success

$ python3 main.py --src ./test_success.json --max 3 --chunk 1024
> Downloading -3557342921266950271_500 now!
> Downloading -2865197712751752189_300 now!
> Downloading -700390739090695736_600 now!
> Downloading 5636641034660171054_700 now!
> Downloading 5773939477608183504_400 now!
> Downloading 1310250945337633844_200 now!
> All resources have been successfully downloaded!
Downloaded 6 Failed 0 Left 0: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 6/6 [00:01<00:00,  4.33it/s]
# Notice : The long string of characters in front of the file name is
# a unique hash code used to ensure the uniqueness of the file naming.

Failed

$ python3 main.py --src ./test_failed.json --max 3 --chunk 1024
> Downloading -6762229335681689814_700 now!
> Downloading -55066400530373971_600 now!
> Downloading -2931830335596416142_500 now!
> Downloading 2353655904693015958_300 now!
> Downloading -5222952479054798371_non-existent-url now!
> 1 files failed to download!
> Plz rerun with "python3 main.py --src failed.json --save . --max 3 --interval 0.5 --chunk 1024"
Downloaded 4 Failed 1 Left 0: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5/5 [00:01<00:00,  4.53it/s]

Please follow the instructions to rerun.

fastdownloader's People

Contributors

mgmcn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

liulime gshrub

fastdownloader's Issues

duplicate file names

The link to the download file has been de-duplicated with set, but the file name may be duplicated.

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.