From ace2575cf9a04e1678b27220eb87297d16fccd0d Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 21 Jul 2019 23:39:12 +0200 Subject: [PATCH] Tweak blacklist --- app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 7a0ef1e..ee547ef 100644 --- a/app.py +++ b/app.py @@ -129,7 +129,11 @@ H2T.ignore_images = True def is_blacklisted(url: str) -> bool: - return urlparse(url).netloc in BLACKLIST + try: + return urlparse(url).netloc in BLACKLIST + except Exception: + logger.exception(f"failed to blacklist for {url}") + return False def verify_pass(pwd):