find_urls
- gwdatafind.find_urls(site, frametype, gpsstart, gpsend, match=None, urltype='file', on_gaps='warn', host=None, session=None, **request_kw)
Query a GWDataFind host for all URLs for a dataset in an interval.
- Parameters
site (
str
) – single-character name of site to matchframetype (
str
) – name of dataset to matchgpsstart (
int
, optional) – GPS start time of intervalgpsend (
int
, optional) – GPS end time of intervalmatch (
str
,re.Pattern
, optional) – regular expression pattern to match URLs againsturltype (
str
, optional) – URL scheme to search foron_gaps (
str
, optional) –what to do when the requested all or some of the GPS interval is not covereed by the dataset, one of:
'error'
: raise aRuntimeError
'warn'
: print a warning but return all available URLs'ignore'
: return the list of URLs with no warnings
host (
str
, optional) – the URL/name of the GWDataFind host to query; if not givenget_default_host()
will be used to discover the default host.session (
requests.Session
, optional) – the connection session to use; if not given, aigwn_auth_utils.requests.Session
will be created on-the-fly**request_kw – other keywords are passed to
igwn_auth_utils.requests.get()
- Raises
requests.RequestsException – if the request fails for any reason
RuntimeError – if gaps in the dataset are found and
on_gaps="error"
was given