From 02c1aa291747a8f139861838436b5c8f003414fa Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Sun, 24 Oct 2021 16:37:27 -0400 Subject: [PATCH] If WHOOGLE_MINIMAL is activated, collapse all non-link results --- app/filter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/filter.py b/app/filter.py index 8f241e5..8dbd32e 100644 --- a/app/filter.py +++ b/app/filter.py @@ -186,8 +186,12 @@ class Filter: # Loop through results and check for the number of child divs in each for result in self.main_divs: result_children = pull_child_divs(result) - if len(result_children) < self.RESULT_CHILD_LIMIT: - continue + if WHOOGLE_MINIMAL=="1": + if len(result_children) in (1,3): + continue + else: + if len(result_children) < self.RESULT_CHILD_LIMIT: + continue # Find and decompose the first element with an inner HTML text val. # This typically extracts the title of the section (i.e. "Related