module filehelper.internet_helper
¶
Short summary¶
module pyquickhelper.filehelper.internet_helper
Gather functions about downloading from internet, …
Classes¶
class |
truncated documentation |
---|---|
Raised by |
Functions¶
function |
truncated documentation |
---|---|
Downloads a small file. If url is an url, it downloads the file and returns the downloaded filename. If it has … |
|
Reads the content of a url. |
Documentation¶
Gather functions about downloading from internet, …
- exception pyquickhelper.filehelper.internet_helper.ReadUrlException[source]¶
Bases:
Exception
Raised by
read_url
.
- pyquickhelper.filehelper.internet_helper.download(url, path_download='.', outfile=None, fLOG=<function noLOG>)[source]¶
Downloads a small file. If url is an url, it downloads the file and returns the downloaded filename. If it has already been downloaded, it is not downloaded again The function raises an exception if the url does not contain
http://
orhttps://
orftp://
.- Parameters:
url – url
path_download – download the file here
outfile – see below
fLOG – logging function
- Returns:
the filename
If outfile is None, the function will give a relative name based on the last part of the url. If outfile is “”, the function will remove every weird character. If outfile is not null, the function will use it. It will be relative to the current folder and not path_download.