- if e.code == 404 and allow_404:
- logging.warning("WARNING: failed to retrieve content from: " + url)
- return None
- raise
-
-
-def retrieve_json(*args, **kwargs):
- """ Fetch the contents of a URL, parse it as JSON and return it. See
- retrieve() for the list of all parameters. """
- return json.loads(retrieve(*args, **kwargs))