|
|
|
@ -205,13 +205,17 @@ class Filter:
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
# Loop through results and check for the number of child divs in each
|
|
|
|
|
for result in self.main_divs:
|
|
|
|
|
for result in self.main_divs.find_all():
|
|
|
|
|
result_children = pull_child_divs(result)
|
|
|
|
|
if minimal_mode:
|
|
|
|
|
if any(f">{x}</span" in str(s) for s in result_children
|
|
|
|
|
for x in minimal_mode_sections):
|
|
|
|
|
result.decompose()
|
|
|
|
|
continue
|
|
|
|
|
for s in result_children:
|
|
|
|
|
if ('Twitter ›' in str(s)):
|
|
|
|
|
result.decompose()
|
|
|
|
|
continue
|
|
|
|
|
if len(result_children) < self.RESULT_CHILD_LIMIT:
|
|
|
|
|
continue
|
|
|
|
|
else:
|
|
|
|
|