Python 2 support

This commit is contained in:
Akash 2020-07-17 21:08:32 +05:30 committed by GitHub
parent 9860527d96
commit f2112c73f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,11 +56,11 @@ class Url():
def handle_HTTPError(self, e): def handle_HTTPError(self, e):
if e.code >= 500: if e.code >= 500:
raise WaybackError(e) from None raise WaybackError(e)
if e.code == 429: if e.code == 429:
raise WaybackError(e) from None raise WaybackError(e)
if e.code == 404: if e.code == 404:
raise HTTPError(e) from None raise HTTPError(e)
def save(self): def save(self):
request_url = ("https://web.archive.org/save/" + self.clean_url()) request_url = ("https://web.archive.org/save/" + self.clean_url())