From 9dd33de91ab6869bed6e910dc09cbfa69d5f9ace Mon Sep 17 00:00:00 2001 From: rstefko Date: Sun, 28 Sep 2025 08:32:23 +0200 Subject: [PATCH] Seems to be working again with new UA --- app/utils/search.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/utils/search.py b/app/utils/search.py index 0f2d7fe..7795a9a 100644 --- a/app/utils/search.py +++ b/app/utils/search.py @@ -147,10 +147,9 @@ class Search: # force mobile search when view image is true and # the request is not already made by a mobile - # FIXME: Broken since the user agent changes as of 16 Jan 2025 - # view_image = ('tbm=isch' in full_query - # and self.config.view_image - # and not g.user_request.mobile) + view_image = ('tbm=isch' in full_query + and self.config.view_image + and not g.user_request.mobile) get_body = g.user_request.send(query=full_query, force_mobile=self.config.view_image, @@ -161,9 +160,8 @@ class Search: 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 - # if view_image: - # html_soup = content_filter.view_image(html_soup) + if view_image: + html_soup = content_filter.view_image(html_soup) # Indicate whether or not a Tor connection is active if g.user_request.tor_valid: