ATMOS/pyatmos/utils/try_download.py

22 lines
458 B
Python
Raw Normal View History

import wget
2019-11-25 00:19:36 +08:00
def wget_download(url,dir_file,desc=None):
"""
Download files by wget command
Inputs:
url -> [str]
dir_file -> [str] output filename or directory
Parameters:
desc -> [str] description of the downloading
Outpits:
wget_out -> [str] path and filename where URL is downloaded to
"""
if desc: print(desc)
wget_out = wget.download(url,dir_file)
print()
return wget_out
2020-07-24 17:30:07 +08:00