Just clone the repo and alias the download.py
to something like dw
and you're good to go.
git clone https://github.com/deepjyoti30/downloader-cli
Make sure that you have the following python modules installed.
Use the
requirements.txt
file to install them.
pip install -r requirements.txt
Run the command with
sudo
if you get permission denied.
The script also allows some other values from the commandline.
usage: download.py [-h] [-o] URL [des]
positional arguments:
URL URL of the file
des The name of the file to be saved with.
optional arguments:
-h, --help show this help message and exit
-o Overwrite if the file already exists else, try to resume
download.
Want to use it in your project?
Just include the file in your project directory and import it. It's simple to use it.
from download import Download
Download(url).download()
Above is the simplest way to use it in your app. The other arguments are optional.
The module takes 5 arguments.
Name | required | default |
---|---|---|
URL | Yes | |
des | No | None (Current directory is selected and the name is extracted from the URL) |
overwrite | No | False |
icon_done | No | ▓ |
icon_left | No | ░ |
This is when I passed icon_done
as #
and icon_left
as space.