Closed h6197627 closed 2 years ago
@h6197627 This should probably raise a custom exception instead of ValueError. Maybe BlockedSiteError
?
In my opinion it is better to simply return no snapshots available without exceptions, as from the user perspective, I think, it doesn't matter is it blocked or simply was not archived. Though in some use cases, which I am not aware of, it might be important to know this information.
But probably you are right, if API interpret this situation as an exception, then it is better to stay closer to API. I think custom BlockedSiteError is OK.
URLs that was excluded from Wayback Machine are not handled properly using CDX Server API (Availability API is fine). Manual web user interface request returns:
API request returns:
org.archive.util.io.RuntimeIOException: org.archive.wayback.exception.AdministrativeAccessControlException: Blocked Site Error
waybackpy cdx_utils.py does not expect such response and crashes with exception:
To Reproduce Sample URL: http://gotceleb.com
Version: