A powerful python based downloader module.
Project description
Python Downloader Demo
Build a powerful python based downloader app.
Requirements
- python>=3.6
- requests
- tqdm
- retry
- hashlib
- multitasking
- signal
- gooey
GUI
Run the following code to active the GUI app.
❯ pythonw app.py # on macOS
# ❯ python app.py # on windows
Note: on macOS, you should conda install python.app
to run wxPython based applications.
Here are the GUI snapshots:
Command line
❯ python src/pydownloader.py -h
usage: pydownloader.py [-h] [--url URL] [--file_name FILE_NAME] [--output_dir OUTPUT_DIR]
optional arguments:
-h, --help show this help message and exit
--url URL Download URL
--file_name FILE_NAME
Downloaded file name
--output_dir OUTPUT_DIR
Download directory
For example, we want to download the github repo gitignore with url = 'https://github.com/github/gitignore/archive/refs/heads/master.zip'
to the download
folder with file name gitignore-master.zip
:
❯ python src/pydownloader.py # run this line with all default settings
Downloading gitignore-master.zip...
Parts Number: 1
Downloading: gitignore-master.zip: 102656it [00:00, 191178.15it/s]
File MD5 Check: 9b178f9e5e12eb7c98262fa6d12b0962 # You can use the MD5 to verify the download.
If the file is already there, you will be asked to overwrite the file or not.
❯ python src/pydownloader.py # run this line with all default settings
Downloading gitignore-master.zip...
⛔️ download/gitignore-master.zip already exists, overwrite it?? (Y/N): y # y means overwrite it.
Downloading: gitignore-master.zip: 102656it [00:00, 154025.74it/s]
File MD5 Check: 9b178f9e5e12eb7c98262fa6d12b0962
Feel free to download other link, for example, let's download Google TensorFlow Repo, we can do:
❯ python src/pydownloader.py --url https://github.com/tensorflow/tensorflow/archive/refs/heads/master.zip --file_name tensorflow-master.zip --output_dir download
Downloading tensorflow-master.zip...
Downloading: tensorflow-master.zip: 74670208it [00:20, 3610045.55it/s]
File MD5 Check: dcaba2148e899a87d8add27ec50fb960
Then we can find the zip files in our download
folder.
❯ tree download
download
├── gitignore-master.zip
└── tensorflow-master.zip
0 directories, 2 files
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pySpeedDownloader-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd901e347c10aa17ca68a82beaf636f8039b437571e8b67e6c1c986275114b97 |
|
MD5 | ebdfe63707fd5196daf9382629af846e |
|
BLAKE2b-256 | 5c491941d5c12b52616f82e2b7fe4c2e2a5cc9a875dc89585122b371ccb76a08 |