Download a file from a link.
If you want to download the contents to a file, supply
filename . The function will return that filename as a
check.
If you want to read the contents immediately from the url, just give
the link, and a fileobject and the url object will be returned.
Remember to close the url after finishing reading!
- Parameters:
link (string) - the url of the file
filename (str) - the name of the file to write to (optional)
- Returns: string(, FancyURLopener)
- output filename(, url object)
|