From 7c5094d37b803a7238b4f0d56c1ea80516467428 Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Fri, 11 Feb 2022 16:42:11 -0500 Subject: [PATCH] Check for soup body in `remove_site_blocks` (#651) Fixes error with `remove_site_blocks` in the Images tab --- app/filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/filter.py b/app/filter.py index 66cced7..5fe5115 100644 --- a/app/filter.py +++ b/app/filter.py @@ -123,7 +123,7 @@ class Filter: return soup def remove_site_blocks(self, soup) -> None: - if not self.config.block: + if not self.config.block or not soup.body: return search_string = ' '.join(['-site:' + _ for _ in self.config.block.split(',')])