I\'m trying to create a Python function that does the same thing as this wget command:
wget -c --read-timeout=5 --tries=0 \"$URL\"
-c
For Windows and Python 3.x, my two cents contribution about renaming the file on download :
pip install wgetimport wget
wget.download('Url', 'C:\\PathToMyDownloadFolder\\NewFileName.extension')
Truely working command line example :
python -c "import wget; wget.download(""https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz"", ""C:\\Users\\TestName.TestExtension"")"
Note : 'C:\\PathToMyDownloadFolder\\NewFileName.extension' is not mandatory. By default, the file is not renamed, and the download folder is your local path.