mirror of
https://github.com/benbusby/whoogle-search.git
synced 2025-08-07 09:04:02 -04:00
Check for soup body in remove_site_blocks
(#651)
Fixes error with `remove_site_blocks` in the Images tab
This commit is contained in:
parent
c6c9965335
commit
7c5094d37b
@ -123,7 +123,7 @@ class Filter:
|
|||||||
return soup
|
return soup
|
||||||
|
|
||||||
def remove_site_blocks(self, soup) -> None:
|
def remove_site_blocks(self, soup) -> None:
|
||||||
if not self.config.block:
|
if not self.config.block or not soup.body:
|
||||||
return
|
return
|
||||||
search_string = ' '.join(['-site:' +
|
search_string = ' '.join(['-site:' +
|
||||||
_ for _ in self.config.block.split(',')])
|
_ for _ in self.config.block.split(',')])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user