fix: error message

This commit is contained in:
eggplants
2022-02-04 08:24:04 +09:00
parent f3f77c30ef
commit 75352df296

View File

@@ -142,7 +142,7 @@ class WaybackMachineSaveAPI(object):
regex = r"https?://web\.archive.org/web/([0-9]{14})/http" regex = r"https?://web\.archive.org/web/([0-9]{14})/http"
m = re.search(regex, str(self._archive_url)) m = re.search(regex, str(self._archive_url))
if m is None or len(m.groups()) != 1: if m is None or len(m.groups()) != 1:
raise ValueError("Could not find get timestamp") raise ValueError("Could not get timestamp")
string_timestamp = m.group(1) string_timestamp = m.group(1)
timestamp = datetime.strptime(string_timestamp, "%Y%m%d%H%M%S") timestamp = datetime.strptime(string_timestamp, "%Y%m%d%H%M%S")