Fix pep8 issues (7)
This commit is contained in:
parent
942c26e812
commit
ee2351f01d
|
@ -125,13 +125,14 @@ class Filter:
|
||||||
def remove_site_blocks(self, soup) -> None:
|
def remove_site_blocks(self, soup) -> None:
|
||||||
if not self.config.block:
|
if not self.config.block:
|
||||||
return
|
return
|
||||||
search_string = ' '.join(['-site:' +
|
search_string = ' '.join(['-site:' +
|
||||||
_ for _ in self.config.block.split(',')])
|
_ for _ in self.config.block.split(',')])
|
||||||
selected = soup.body.findAll(text=re.compile(search_string))
|
selected = soup.body.findAll(text=re.compile(search_string))
|
||||||
|
|
||||||
for result in selected:
|
for result in selected:
|
||||||
result.string.replace_with(
|
result.string.replace_with(
|
||||||
result.string.replace(search_string, ''))
|
result.string.replace(
|
||||||
|
search_string, ''))
|
||||||
|
|
||||||
def remove_ads(self) -> None:
|
def remove_ads(self) -> None:
|
||||||
"""Removes ads found in the list of search result divs
|
"""Removes ads found in the list of search result divs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user