Update wrapper.py
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import json, re
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from waybackpy.exceptions import WaybackError
|
from waybackpy.exceptions import WaybackError
|
||||||
|
|
||||||
@@ -56,9 +57,9 @@ 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) from None
|
||||||
elif e.code == 429:
|
if e.code == 429:
|
||||||
raise WaybackError(e) from None
|
raise WaybackError(e) from None
|
||||||
elif e.code == 404:
|
if e.code == 404:
|
||||||
raise HTTPError(e) from None
|
raise HTTPError(e) from None
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user