module helper.download_helper
¶
Short summary¶
module pyrsslocal.helper.download_helper
various function to get the content from a url
Functions¶
function |
truncated documentation |
---|---|
Downloads a file from internet (it assumes it is text information, otherwise, encoding should be None). |
Documentation¶
various function to get the content from a url
- pyrsslocal.helper.download_helper.get_url_content_timeout(url, timeout=10, output=None, encoding='utf8')¶
Downloads a file from internet (it assumes it is text information, otherwise, encoding should be None).
- Parameters:
url – (str) url
timeout – (in seconds), after this time, the function drops an returns None, -1 for forever
output – (str) if None, the content is stored in that file
encoding – (str) utf8 by default, but if it is None, the returned information is binary
- Returns:
content of the url
If the function automatically detects that the downloaded data is in gzip format, it will decompress it.