mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-03-11 08:54:34 +00:00
Merge pull request #1251 from rstefko/images-with-links
Re-enable view_image functionality
This commit is contained in:
commit
e0a4a5f2cb
2 changed files with 4 additions and 12 deletions
|
|
@ -161,7 +161,6 @@
|
|||
.e3goi {
|
||||
vertical-align: top;
|
||||
padding: 0;
|
||||
height: 180px;
|
||||
}
|
||||
.GpQGbf {
|
||||
margin: auto;
|
||||
|
|
@ -210,8 +209,6 @@
|
|||
text-align: center;
|
||||
}
|
||||
.RAyV4b {
|
||||
width: 162px;
|
||||
height: 140px;
|
||||
line-height: 140px;
|
||||
overflow: "hidden";
|
||||
text-align: center;
|
||||
|
|
@ -220,8 +217,6 @@
|
|||
text-align: center;
|
||||
margin: auto;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
.Tor4Ec {
|
||||
|
|
|
|||
|
|
@ -148,10 +148,8 @@ 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)
|
||||
|
||||
client = self.user_request or g.user_request
|
||||
get_body = client.send(query=full_query,
|
||||
|
|
@ -168,9 +166,8 @@ class Search:
|
|||
html_soup = html_soup.html
|
||||
|
||||
# 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 (self.user_request or g.user_request).tor_valid:
|
||||
|
|
|
|||
Loading…
Reference in a new issue