add: TooManyRequestsError
This commit is contained in:
@@ -8,14 +8,13 @@ This module contains the set of Waybackpy's exceptions.
|
||||
class WaybackError(Exception):
|
||||
"""
|
||||
Raised when Waybackpy can not return what you asked for.
|
||||
1) Wayback Machine API Service is unreachable/down.
|
||||
2) You passed illegal arguments.
|
||||
|
||||
All other exceptions are inherited from this class.
|
||||
1) Wayback Machine API Service is unreachable/down.
|
||||
2) You passed illegal arguments.
|
||||
|
||||
All other exceptions are inherited from this class.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class RedirectSaveError(WaybackError):
|
||||
"""
|
||||
@@ -23,15 +22,18 @@ class RedirectSaveError(WaybackError):
|
||||
redirect URL is archived but not the original URL.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class URLError(Exception):
|
||||
"""
|
||||
Raised when malformed URLs are passed as arguments.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
class TooManyRequestsError(WaybackError):
|
||||
"""
|
||||
Raised when you make more than 15 requests per
|
||||
minute and the Wayback Machine returns 429.
|
||||
"""
|
||||
|
||||
|
||||
class MaximumRetriesExceeded(WaybackError):
|
||||
@@ -39,28 +41,20 @@ class MaximumRetriesExceeded(WaybackError):
|
||||
MaximumRetriesExceeded
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class MaximumSaveRetriesExceeded(MaximumRetriesExceeded):
|
||||
"""
|
||||
MaximumSaveRetriesExceeded
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class ArchiveNotInAvailabilityAPIResponse(WaybackError):
|
||||
"""
|
||||
Could not parse the archive in the JSON response of the availability API.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class InvalidJSONInAvailabilityAPIResponse(WaybackError):
|
||||
"""
|
||||
availability api returned invalid JSON
|
||||
"""
|
||||
|
||||
pass
|
||||
|
Reference in New Issue
Block a user