This commit is contained in:
jinql
2025-09-06 20:45:47 +08:00
parent a92dd232ee
commit 3102ce8b8e
4 changed files with 29 additions and 26 deletions

View File

@@ -360,5 +360,5 @@ _pattern_domain = re.compile(
def failed_url_cache(_domain: str, _time: int):
if _domain:
_current_time = int(time.time())
if (not failed_urls[_domain]) or (_current_time <= failed_urls[_domain]):
if (not failed_urls.get(_domain)) or (_current_time <= failed_urls.get(_domain)):
failed_urls[_domain] = _current_time + _time