Download resources from online storage with ONLY ONE command line!!
English | 中文文档
DriveDownloader is a Python-based CLI tool for downloading files on online drives. With DriveDownloader, one can download the resources from netdrive with only one command line.
DriveDownloader now supports:
ddl URL/FILELIST [--filename FILENAME] [--thread-number NUMBER] [--version] [--help]
URL/FILELIST
: target url/filelist to download from. The example of filelist is shown in tests/test.list
.
--filename/-o FILENAME
: (optional) output filename. Example: 'hello.txt'--thread-number/-n NUMBER
: (optional) the thread number when using multithread.--force-back-google/-F
: (optional) use the backup downloader for Google drive (it needs authentication, but is more stable).http_proxy
and https_proxy
to your proxy addresses, and DriveDownloader will automatically read them. pip install DriveDownloader
git clone https://github.com/hwfan/DriveDownloader.git && cd DriveDownloader
python setup.py install
Coming Soon.
pip install -r requirements.txt
to install the packages.You can also see these examples in tests/run.sh
.
echo "Unit Tests of DriveDownloader"
mkdir -p test_outputs
echo "Testing Direct Link..."
# direct link
ddl https://www.google.com.hk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png -o test_outputs/directlink.png
echo "Testing OneDrive..."
# OneDrive
ddl https://1drv.ms/t/s!ArUVoRxpBphY5U-a3JznLkLG1uEY?e=czbq1R -o test_outputs/hello_od.txt
echo "Testing GoogleDrive..."
# GoogleDrive
ddl https://drive.google.com/file/d/1XQRdK8ewbpOlQn7CvB99aT1FLi6cUKt_/view?usp=sharing -o test_outputs/hello_gd.txt
echo "Testing SharePoint..."
# SharePoint
ddl https://bupteducn-my.sharepoint.com/:t:/g/personal/hwfan_bupt_edu_cn/EQzn4SeFkJZHq8OikhX7X3QB97PSiNvJpPVtllBQln8EQw?e=NmgRSc -o test_outputs/hello_sp.txt
echo "Testing Dropbox..."
# Dropbox
ddl https://www.dropbox.com/s/bd0bak3h9dlfw3z/hello.txt?dl=0 -o test_outputs/hello_db.txt
echo "Testing File List..."
# file list
ddl test.list -l
echo "Testing Multi Thread..."
# Multi Thread
ddl https://www.dropbox.com/s/r4bme0kew42oo7e/Get%20Started%20with%20Dropbox.pdf?dl=0 -o test_outputs/Dropbox.pdf -n 8
Why does "Size:Invalid" occur?
I couldn't connect to the target server through a socks5 proxy.
There exists some old bugs in my DriveDownloader.
pip install DriveDownloader --force-reinstall --upgrade
to update. We keep the latest version of DDL free from those bugs.!{some string}: event not found
Since bash can parse "!" from the url, single quotes(') should be added before and after the url when using bash.
ddl 'https://1drv.ms/t/s!ArUVoRxpBphY5U-a3JznLkLG1uEY?e=czbq1R' -o test_outputs/hello_od.txt
Some code of DriveDownloader is borrowed from PyDrive2 and rich. Thanks for their wonderful jobs!
-l/--list
is deprecated.-p/--proxy
is deprecated.-v/--version
.