Commit Graph

333 Commits

Author SHA1 Message Date
hryxl
4cab2c394c
Update header.css 2022-03-21 12:31:02 +03:00
hryxl
3ad773de20
Update header.css 2022-03-21 12:09:22 +03:00
hryxl
0f1e347749
Update header.css 2022-03-21 12:06:01 +03:00
hryxl
0dedf8812a
Update header.css 2022-03-21 12:03:58 +03:00
hryxl
3913b6b601
Update header.css 2022-03-21 11:56:40 +03:00
hryxl
039169062b
Update header.css 2022-03-21 11:45:36 +03:00
hryxl
1375fa670a
Update header.css 2022-03-21 11:30:20 +03:00
hryxl
e2f7e408bd
Update header.css 2022-03-21 11:04:43 +03:00
hryxl
40b2633983
Update header.css 2022-03-21 11:03:48 +03:00
hryxl
ab3865f0a0
Update header.css 2022-03-21 11:01:16 +03:00
hryxl
05b347e150
Update header.css 2022-03-21 10:58:29 +03:00
hryxl
c5c22824af
Update header.css 2022-03-21 10:56:04 +03:00
hryxl
d1598d895b
Update header.css 2022-03-21 10:53:44 +03:00
hryxl
e77693230d
Update header.css 2022-03-21 10:51:34 +03:00
hryxl
44ff8bb3b7
Update header.css 2022-03-21 10:49:59 +03:00
hryxl
63c1431823
Update header.css 2022-03-21 10:48:28 +03:00
hryxl
ef08decee4
Update header.css 2022-03-21 10:46:33 +03:00
hryxl
ac13b27bb3
Update header.css 2022-03-21 10:44:24 +03:00
hryxl
89ac610a7c
Update header.css 2022-03-21 10:42:36 +03:00
hryxl
c05726973a
Update header.css 2022-03-21 10:40:43 +03:00
hryxl
f0dc6d1646
Update header.css 2022-03-21 10:35:57 +03:00
hryxl
51b4b3bcd5
Update header.css 2022-03-21 10:32:40 +03:00
hryxl
f79d9fc1e0
Update main.css 2022-03-21 10:25:51 +03:00
hryxl
89567e8783
Update main.css 2022-03-21 10:22:31 +03:00
hryxl
41b35ae6c8
Update header.css 2022-03-21 10:21:24 +03:00
hryxl
cabf61ed5c
Update header.css 2022-03-21 10:18:18 +03:00
hryxl
cf2212105b
Update header.css 2022-03-21 10:15:39 +03:00
hryxl
4c22fe7627
Update logo.html 2022-03-21 10:07:59 +03:00
hryxl
c9e5803df1
Update logo.html 2022-03-21 09:46:17 +03:00
hryxl
d696723f6c
Update logo.html 2022-03-21 09:44:07 +03:00
hryxl
dbe20c5f82
Merge branch 'benbusby:main' into main 2022-03-03 00:24:29 +03:00
Ben Busby
2a0ad8796c
Switch to defusedxml for xml parsing
xml.etree.ElementTree.fromstring is considered insecure, see:
https://docs.python.org/3/library/xml.etree.elementtree.html

The defusedxml package contains several Python-only workarounds and
fixes for denial of service and other vulnerabilities in Python's XML
libraries: https://github.com/tiran/defusedxml

Fixes #670
2022-03-01 12:54:32 -07:00
Ben Busby
f7e3650728
Only remove G links in footer
Links that were directed at G domains were previously removed
universally, when really they only needed to be removed from the footer
to reduce possible confusion caused by mixed Whoogle and G links.

Fixes #656
2022-03-01 12:48:33 -07:00
Ben Busby
69f845a047
Add test for empty bang behavior
Also fix pep8 issue
2022-03-01 12:13:40 -07:00
Ben Busby
809520ec70
Fallback to home page for empty bang searches
Bang searches without an actual query (i.e. just searching "!gh") will
now redirect to the home page. I guess people do this for some reason
and don't like that it redirects to the correct bang result URL, but
without an actual search term.

Fixes #595
2022-03-01 12:06:59 -07:00
hryxl
af410f8046
Merge branch 'benbusby:main' into main 2022-02-28 18:55:01 +03:00
Ben Busby
b28fa86e33
Update ad filter
Recent changes to ads in search results caused Whoogle to display ads
for certain searches. In particular, ads recently started appearing
grouped into one div, as opposed to a singular ad per div. This was
accompanied by the div label "ads" (instead of just "ad"), which threw
off the existing ad filter. The ad keyword blacklist has been updated
accordingly, and has been enhanced to only check against alpha chars for
each label.

This only seems to have affected English language searches, and only for
very specific searches.
2022-02-25 23:02:58 -07:00
hryxl
a6a8105672
Update footer.html 2022-02-20 15:10:05 +03:00
Ben Busby
9984158ec1
Ensure valid str->float conv in currency calc
Currency amounts returned by google seem to randomly include unicode
chars ('\xa0' noted in #642) which broke the currency calculator
included in the project. This ensures that only strings that can be
converted to float are ever used in the conversion.

Fixes #642
2022-02-17 16:33:44 -07:00
Nitish Yadav
0e711beca7
Give Accept-Language div its own class (#659)
Fixes accidental assignment of "get-only" class to the
"Accept-Language" config option
2022-02-16 09:23:38 -07:00
Ben Busby
23402e27e1
Check for updates using 24 hour time delta
Rather than only checking for an available update on app init, the check
for updates now performs the check once every 24 hours on the first
request sent after that period.

This also now catches the requests.exceptions.ConnectionError that is
thrown if the app is initialized without an active internet connection.

Fixes #649
2022-02-14 12:19:02 -07:00
Ben Busby
d33e8241dc
Fix "my ip" search regression
Removes dependency on class names for creating the "my ip" info card in
the results list for searches pertaining to the user's public IP.

Adds test to prevent this from happening again.

Note to anyone reading this and looking to contribute: please avoid
using hardcoded class names at all costs. This approach of
creating/removing content just results in issues if/when Google decides
to introduce/remove class names from the result page.

Fixes #657
2022-02-14 11:40:11 -07:00
DUO Labs
b2c048af92
Fix collapse_sections for MINIMAL_MODE (#654) 2022-02-11 14:44:08 -07:00
DUO Labs
7c5094d37b
Check for soup body in remove_site_blocks (#651)
Fixes error with `remove_site_blocks` in the Images tab
2022-02-11 14:42:11 -07:00
DUO Labs
502067addc
Clean "Show more results" of all site blocks (#646) 2022-02-08 10:57:00 -07:00
Joao A. Candido Ramos
11099f7b1d
Use consistent header for all result types (#535)
Introduces a header for switching between result types (i.e. "All", "News",
etc) that is consistent between the different result types. Previously, image
results had a tab header that was formatted in a drastically different manner,
which was jarring when switching from a different result page to the Images
page.

Created a G class enum to reference class names returned in search
results. As noted in the class doc, this should only be used/updated as
a last resort, as class names change frequently. For some instances,
such as replacing the tbm tab, it's a lot easier to just replace by
header name than attempting to replace it based on how the element is
structured.

Also updated a few styles to revert the latest styling changes being
applied by Google.

Co-authored-by: jacr13 <ramos.joao@protonmail.com>
Co-authored-by: Ben Busby <contact@benbusby.com>
2022-02-07 10:47:25 -07:00
සයුරි | Sayuri
4aa94a5d75
Fix Sinhala translation for farside search (#594) 2022-02-04 16:16:56 -07:00
DUO Labs
500942cb99
Update minimal mode for new Google formatting (#637)
Google's latest formatting changes broke the modifications made when enabling
`WHOOGLE_MINIMAL`. This updates the result filtering to work with the new
changes.

Fixes #634
2022-02-02 12:57:05 -07:00
Ben Busby
b393e68d1d
Fix incorrect min-width for mobile screen sizes
min-width was previously set to 736px for all screen sizes, which forced
content off screen for smaller devices such as mobile phones. This
modifies the search stylesheet to only apply a min-width style to
devices > 800px wide.
2022-02-01 20:36:53 -07:00
Ben Busby
e3394e29dd
Amend body width formatting in search css
`min-width` is a better field to override than `max-width`, since some
users prefer full width results.
2022-02-01 17:24:12 -07:00