Commit Graph

71 Commits (797372ecaaf74bc65fb466f710610ff6ba2cb38f)

Author SHA1 Message Date
Ben Busby afd5b9aa83 Minor fix to dark mode on img results 4 years ago
Ben Busby a11ceb0a57
Feature: language config (#27)
* Added language configuration support

Main page now has a dropdown for selecting preferred language of
results.

Refactored config to be its own model with language constants.

* Added more language support

Interface language is now updated using the "hl" arg

Fixed chinese traditional and simplified values

Updated decoding of characters to gb2312

* Updated to use conditional decoding dependent on language

* Updated filter to not rely on valid config to work properly
4 years ago
Ben Busby 708769f682 Minor styling refactor, updated app name 4 years ago
Ben Busby 0300eab6df Updated formatting and setup instructions
Switched encoding from utf-8 to unicode-escape in an effort to support multiple
languages besides English.

Updated image results page formatting to fix bad image links (added TODO
for adding full res image link for each image result).

Updated README to include libcurl and libssl install instructions for
manual setup.
4 years ago
Ben Busby 39c475af21 Using urlencode "doseq" option for url args 4 years ago
Ben Busby c30f21f950 Minor conditional fix in filter 4 years ago
Ben Busby b83f14be26 Fixed image href filter
Needed to be checking against img attrs, not just the img object itself
4 years ago
Ben Busby dcd93d4869 Fixed filter params, updated search button text 4 years ago
Ben Busby 5fe308956b Cleaned up filter class, updated js config tool 4 years ago
Ben Busby 1cbe394e6f Updated tests, fixed a few bugs
Added opensearch routes test and individual tests for searching via GET
and POST separately.

Fixed incorrect assignment in gen_query.
4 years ago
Ben Busby 0c0ebb8917 Added POST search, encrypted query strings, refactoring
The implementation of POST search support comes with a few benefits. The
most apparent is the avoidance of search queries appearing in web server
logs -- instead of the prior GET approach (i.e.
/search?q=my+search+query), using POST requests with the query stored in
the request body creates logs that simply appear as "/search".

Since a lot of relative links are generated in the results page, I came
up with a way to generate a unique key at run time that is used to
encrypt any query strings before sending to the user. This benefits both
regular text queries as well as fetching of image links and means that
web logs will only show an encrypted string where a link or query
string might slip through.

Unfortunately, GET search requests still need to be supported, as it
doesn't seem that Firefox (on iOS) supports loading search engines by
their opensearch.xml file, but instead relies on manual entry of a
search query string. Once this is updated, I'll probably remove GET
request search support.
4 years ago
Ben Busby 4180aedd87 Added image proxying, refactored filter class
Images were previously directly fetched from google search results,
which was a potential privacy hazard. All image sources are now modified
to be passed through shoogle's routing first, which will then fetch raw
image data and pass it through to the user.

Filter class was refactored to split the primary clean method into
smaller, more manageable submethods.
4 years ago
Ben Busby b0e6167733 Improved bad url arg filtering 4 years ago
Ben Busby 3bc58b64be Small update to filter class
The image results page seems to have different formatting from non-image
results pages. Should probably revisit this at some point and try to
style the image results page to be more in line with other result types.
4 years ago
Ben Busby 1f6bfa092e Complete refactoring of opensearch
Refactored opensearch.xml to only exist as a template that is
served by a flask route, which is then populated with the
necessary url root.
4 years ago
Ben Busby a7005c012e Refactoring of user requests and routing
Curl requests and user agent related functionality was moved to its own
request class.

Routes was refactored to only include strictly routing related
functionality.

Filter class was cleaned up (had routing/request related logic in here,
which didn't make sense)
4 years ago
Ben Busby 6a150092a2 Fixed config bug in filter, updated run script to work on mac os 4 years ago
Ben Busby e72ccc4988 Small change to mobile styling 4 years ago
Ben Busby 024552f2df Minor refactor of filter class, updated tests, fixed html/css, added ua to config 4 years ago
Ben Busby b5b6e64177 Added testing and ci build, refactored filter class, refactored project structure 4 years ago
Ben Busby 850a46aea1 Refactored routes, added filter class for returned results, added dockerignore 4 years ago