wget_interface#
- ioapps.wget_interface.get_weblist(url, path, matchstr=None, remove_webfile=True, ext=None)[source]#
DESCRIPTION:
This function collects a list of files beneath the specified URL.
- Parameters:
- url:
str A Python string specifying the path to the internet (world-wide web; WWW) file to be retrieved.
- path:
str A Python string specifying the local path to which to write the retrieved file.
- url:
- Keywords:
- matchstr:
str, optional A Python string specifying a character string for which to search while compiling the list of webfiles; if NoneType on entry, the entire list of files beneath the specified URL will be returned; otherwise, a list of files containing the specified string will be returned.
- remove_webfile:
bool, optional A Python boolean valued variable specifying whether to remove the downloaded file containing the contents of the web directory defined by the specified URL; this value is set as True by default.
- ext:
str, optional A Python string specifying the web filename extension; if NoneType on entry the value defaults to to an empty string.
- matchstr:
- Returns:
- weblist:
List A Python list containing the files beneath the specified URL.
- weblist:
- Raises:
- WgetInterfaceError:
raised if an Exception is encountered; the respective error message accompanys the message string passed to the WgetInterfaceError class.
- Return type:
List
- ioapps.wget_interface.get_webfile(url, path, ignore_missing=False)[source]#
DESCRIPTION:
This function collects the specified URL path using the Python wget package.
- Parameters:
- url:
str A Python string specifying the path to the internet (world-wide web; WWW) file to be retrieved.
- path:
str A Python string specifying the local path to which to write the retrieved file.
- url:
- Keywords:
- ignore_missing:
bool, optional A Python boolean valued variable specifying whether to ignore missing files (True) or raise a CurlErrorInterface exception for missing files (False).
- ignore_missing:
- Raises:
- WgetInterfaceError:
raised if an Exception related to a missing URL path is encountered.
- Return type:
None