Check for soup body in `remove_site_blocks` (#651)

Fixes error with `remove_site_blocks` in the Images tab
pull/659/head
DUO Labs 2 years ago committed by GitHub
parent c6c9965335
commit 7c5094d37b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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(',')])

Loading…
Cancel
Save