diff --git a/app/utils/search.py b/app/utils/search.py index 34b3cb9..71c978a 100644 --- a/app/utils/search.py +++ b/app/utils/search.py @@ -157,8 +157,9 @@ class Search: user_agent=self.user_agent) # Produce cleanable html soup from response - get_body_safed = get_body.text.replace("<","andlt;").replace(">","andgt;") - html_soup = bsoup(get_body_safed, 'html.parser').html + get_body_safed = re.sub(r']*>\s*', '', get_body.text, flags=re.IGNORECASE) + get_body_safed = get_body_safed.replace("<","andlt;").replace(">","andgt;") + html_soup = bsoup(get_body_safed, 'html.parser') # Replace current soup if view_image is active # FIXME: Broken since the user agent changes as of 16 Jan 2025