fix: delete useless conds

This commit is contained in:
eggplants 2022-02-05 06:20:03 +09:00
parent ed6160c54f
commit 7b6401d59b
No known key found for this signature in database
GPG Key ID: E84F494AD6539CE2

View File

@ -108,13 +108,11 @@ class WaybackMachineSaveAPI(object):
if match is not None and len(match.groups()) == 1: if match is not None and len(match.groups()) == 1:
return "https" + match.group(1) return "https" + match.group(1)
if self.response_url: self.response_url = self.response_url.strip()
self.response_url = self.response_url.strip() regex4 = r"web\.archive\.org/web/(?:[0-9]*?)/(?:.*)$"
if "web.archive.org/web" in self.response_url: match = re.search(regex4, self.response_url)
regex4 = r"web\.archive\.org/web/(?:[0-9]*?)/(?:.*)$" if match is not None:
match = re.search(regex4, self.response_url) return "https://" + match.group(0)
if match is not None:
return "https://" + match.group(0)
return None return None