Closed dietervu closed 3 years ago
Looking into the code of b2share.json this might be rather a configuration setting for b2share handles.
Method is_host_registered(pid_string) remains unchanged, as it checks whether the resource is hosted by a known repository. Method is_collection() has been added, that additionally to verifying if the host is known, checks whether provided PID candidate is downloadable. If not it is assumed to point to a collection of resources.
is_host_registered("https://hdl.handle.net/11304/bdf66299-974a-4a6e-9f59-948c9b81258f") returns True, while it cannot be accessed by .fetch() since it is a B2SHARE handle that refers to a file:
https://b2share.eudat.eu/api/files/52379057-7f90-4508-a1c4-a5b308083411/LINGUA-CORPUS_Exploring_genealogical_blends.xlsx
This means that you cannot simply rely on the check by is_host_registered() to continue to fetch the URL. I see 2 options: