diff --git a/datahugger/base.py b/datahugger/base.py index 712790a..8d80536 100644 --- a/datahugger/base.py +++ b/datahugger/base.py @@ -296,6 +296,7 @@ def _get_files_recursive(self, url, folder_name=None, base_url=None): # get the data from URL res = requests.get(url) + res.raise_for_status() response = res.json() # find path to raw files diff --git a/datahugger/services.py b/datahugger/services.py index 5a4275f..421910a 100644 --- a/datahugger/services.py +++ b/datahugger/services.py @@ -320,7 +320,7 @@ class MendeleyDataset(DatasetDownloader): class OSFDataset(DatasetDownloader): """Downloader for OSF repository.""" - REGEXP_ID = r"osf\.io\/(?P.*)/{0,1}" + REGEXP_ID = r"osf\.io\/(?P[^\/]*)\/{0,1}" # the base entry point of the REST API API_URL = "https://api.osf.io/v2/nodes/"