Commit Graph

4455 Commits (d5ecda99303f1555dc34d824f9dca662bbdda24e)

Author SHA1 Message Date
Markus Heiser d5ecda9930 [mod] move language recognition to get_search_query_from_webapp
To set the language from language recognition and hold the value selected by the
client, the previous implementation creates a copy of the SearchQuery object and
manipulates the SearchQuery object by calling function replace_auto_language().

This patch tries to implement a similar functionality in a more central place,
in function get_search_query_from_webapp() when the SearchQuery object is build
up.

Additional this patch uses the language preferred by the client, if language
recognition does not have a match / the existing implementation does not care
about client preferences and uses 'all' in case of no match.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser c03b0ea650 [mod] add a Preferences.client property to store client prefs
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 6592f0d36e [build] /static 1 year ago
Markus Heiser abf574dc0c [mod] Ignore autocomplete_min on queries that include '!' (!bang)
Closes: https://github.com/searxng/searxng/issues/1566
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 09295a3fd1 Update searx.data - update_engine_descriptions.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser a8fb6dffb2 [upd] make data.traits --> searx/data/engine_traits.json
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 27369ebec2 [fix] searxng_extra/update/update_engine_descriptions.py (part 1)
Follow up of #2269

The script to update the descriptions of the engines does no longer work since
PR #2269 has been merged.

searx/engines/wikipedia.py
==========================

1. There was a misusage of zh-classical.wikipedia.org:

   - `zh-classical` is dedicate to classical Chinese [1] which is not
     traditional Chinese [2].

   - zh.wikipedia.org has LanguageConverter enabled [3] and is going to
     dynamically show simplified or traditional Chinese according to the
     HTTP Accept-Language header.

2. The update_engine_descriptions.py needs a list of all wikipedias.  The
   implementation from #2269 included only a reduced list:

   - https://meta.wikimedia.org/wiki/Wikipedia_article_depth
   - https://meta.wikimedia.org/wiki/List_of_Wikipedias

searxng_extra/update/update_engine_descriptions.py
==================================================

Before PR #2269 there was a match_language() function that did an approximation
using various methods.  With PR #2269 there are only the types in the data model
of the languages, which can be recognized by babel.  The approximation methods,
which are needed (only here) in the determination of the descriptions, must be
replaced by other methods.

[1] https://en.wikipedia.org/wiki/Classical_Chinese
[2] https://en.wikipedia.org/wiki/Traditional_Chinese_characters
[3] https://www.mediawiki.org/wiki/Writing_systems#LanguageConverter

Closes: https://github.com/searxng/searxng/issues/2330
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 0adfed195e
Merge pull request #2338 from return42/block-old-farside
[mod] limiter: block unmaintained Farside instances
1 year ago
Markus Heiser 5f6ee2f82c
Merge pull request #2342 from searxng/dependabot/pip/master/pygments-2.15.0
Bump pygments from 2.14.0 to 2.15.0
1 year ago
Markus Heiser b3d8d305d2 [build] /static 1 year ago
searxng-bot a938aeaf1b [translations] update from Weblate
8d1975e8 - 2023-04-12 - return42 <markus.heiser@darmarit.de>
76ff8083 - 2023-04-13 - return42 <markus.heiser@darmarit.de>
a53721ef - 2023-04-13 - return42 <markus.heiser@darmarit.de>
9d8b4810 - 2023-04-08 - Eryk Michalak <gnu.ewm@protonmail.com>
1587a991 - 2023-04-10 - tentsbet <remendne@pentrens.jp>
16c84cef - 2023-04-10 - return42 <markus.heiser@darmarit.de>
29845d20 - 2023-04-09 - ghose <correo@xmgz.eu>
ccdee956 - 2023-04-08 - gallegonovato <fran-carro@hotmail.es>
402b3d27 - 2023-04-08 - return42 <markus.heiser@darmarit.de>
44b1ea99 - 2023-04-10 - return42 <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 8c83547683 [mod] limiter: block unmaintained Farside instances
Since [bb3a01f8] has been merged to the Farside project, Farside instances do no
longer need to send requests to SearXNG instances [1].

There are some old unmaintained Farside instances on the web that continue to
query SearXNG instances --> we can safely block their requests.

[1] https://github.com/benbusby/farside/issues/95
[bb3a01f8] https://github.com/benbusby/farside/commit/bb3a01f8

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser c678b82625 [build] /static 1 year ago
Markus Heiser 962b4c719f [mod] Update input when selecting by TAB
When the user press [TAB] the input form should be filled with the highlighted
item from the autocomplete list, but not release a search / with other words:
what we now have by pressing once on [ENTER] should be mapped to the [TAB] key
and pressing [ENTER] once should release a search query. [1]

[1] https://github.com/searxng/searxng/issues/778#issuecomment-1016593816

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
rinagorsha e9fb9f2705 [mod] Update input when selecting autocomplete prediction with keyboard
- Update input when selecting autocomplete prediction with keyboard
- Search immediately by pressing enter key
- Search immediately by clicking on an autocomplete suggestion

Related:
- https://github.com/searxng/searxng/issues/778
1 year ago
Markus Heiser 7d17d37ac7 [fix] don't show a category if there is no active engine in
When deactivate all the engines of a category, this category should disappeare.
This feature has been lost in commit 8e9ad1cc.

For better readability, webapp.get_enabled_categories() has been rewritten with
identical functionality.

Related:

- https://github.com/searxng/searxng/issues/1020
- https://github.com/searxng/searxng/issues/1604

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser fed2bab65b
Merge pull request #2329 from return42/fix-bing-no-descr
[fix] Bing-WEB: use <span class='algoSlug_icon'> for the description
1 year ago
Markus Heiser 0def555869 [build] /static 1 year ago
Markus Heiser f117f969d8 [mod] in the preference page, show !bang of subgrouping categories
The names of the subgrouping categories in the preference page are translated,
to use this categories the user needs to know by which !bang the category can be
selected.  Related to "Make 'non tab category' bangs discoverable" in [#690].

Related:

- [#690] https://github.com/searxng/searxng/issues/690
- https://github.com/searxng/searxng/issues/1604
- https://github.com/searxng/searxng/pull/1545

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser bbb2af7d94 [fix] minor typo in de/search-syntax page
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 23ac964e35 [fix] Bing-WEB: use <span class='algoSlug_icon'> for the description
On some result items from Bing-WEB the `<span class='algoSlug_icon'>` tag is the
only tag that contains a description.  The issue can be reproduced by [1]::

    !bi vmware

[1] https://github.com/searxng/searxng/issues/1764#issuecomment-1417990531

Reported-by: @AlyoshaVasilieva
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 393e14965a
Merge pull request #2326 from return42/ungrouped
[mod] clarify the difference of the default category and subgrouping
1 year ago
Markus Heiser 8f79dd7659 [doc] additional descriptions about categories & categories_as_tabs
Add missing documentation of PR [#634].  Related to checkbox "Document how to
categorize engines" in [#690].

Related:

- [#634] https://github.com/searxng/searxng/pull/634#issuecomment-1004757502
- [#690] https://github.com/searxng/searxng/issues/690
- https://github.com/searxng/searxng/issues/1604
- https://github.com/searxng/searxng/pull/1545

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 2ffd446e5c [mod] clarify the difference of the default category and subgrouping
This PR does no functional change it is just an attempt to make more clear in
the code, what a default category is and what a subcategory is.  The previous
name 'others' leads to confusion with the **category 'other'**.

If a engine is not assigned to a category, the default is assigned::

    DEFAULT_CATEGORY = 'other'

If an engine has only one category and this category is shown as tab in the user
interface, this engine has no further subgrouping::

    NO_SUBGROUPING = 'without further subgrouping'

Related:

- https://github.com/searxng/searxng/issues/1604
- https://github.com/searxng/searxng/pull/1545

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
searxng-bot 7850c77c2c [translations] update from Weblate
d2fb466c - 2023-04-02 - return42 <markus.heiser@darmarit.de>
5576f597 - 2023-04-02 - return42 <markus.heiser@darmarit.de>
4b28cab9 - 2023-03-31 - Vistaus <vistausss@fastmail.com>
1 year ago
Markus Heiser f46d0584ef
Merge pull request #2322 from return42/fix-2321
[fix] Gigablast.com has been erased
1 year ago
Markus Heiser 64e221426a
Merge pull request #2312 from return42/fix-1020-part-2
[fix] categories can't be removed from UI (categories_as_tabs)
1 year ago
Markus Heiser 5234e45010 [fix] Gigablast.com has been erased
[1] https://www.reddit.com/r/searchengines/comments/128wdcp/gigablastcom_has_been_erased/

Closes: https://github.com/searxng/searxng/issues/2321
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 03f94962b6 [fix] limiter: never block a /healthz request
Related: https://github.com/searxng/searxng/issues/2310#issuecomment-1494417531
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 0c4003ab2d [fix] categories can't be removed from UI (categories_as_tabs)
When using ``use_default_settings: true``, removing default categories from
settings.yml will not remove them from the UI.

The value ``categories_as_tabs`` is a dictionary type (a4c2cfb) and dictionary
types are merged additive by ``settings_loader.update_settings()``.

This patch replaces the default ``categories_as_tabs`` by the one from the
``user_settings``.

Related: https://github.com/searxng/searxng/issues/1019#issuecomment-1193145654
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser a762172bf7 [fix] engine ddg: quote !bangs in a request send to ddg
Closes: https://github.com/searxng/searxng/issues/392
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 0430662189 [fix] engine google-News: fix decoding of URLs (part 2)
Follow up of 8de8070ed to fix the issue reported by AlyoshaVasilieva [1].

[1] https://github.com/searxng/searxng/issues/1959#issuecomment-1493300574

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser a5155a32c0
Merge pull request #2306 from return42/fix-1959
[fix] engine google-News: fix decoding of URLs
1 year ago
Markus Heiser 66810ce711 [mod] limiter: minor improvements
- requests without HTTP header 'Connection' or missing 'User-Agent' will be
  blocked by the limiter

- re_bot is related to 'User-Agent' and has been renamed to block_user_agent

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 8de8070ed9 [fix] engine google-News: fix decoding of URLs
Google-News returns internal links where the origin URL is encoded in a
base64 (RFC 2045 aka URL-safe) string.

Closes: https://github.com/searxng/searxng/issues/1959
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser afd8fcce36 [mod] plugin limiter: improve the log messages
In debug mode more detailed logging is needed to evaluate if an access should
have been blocked by the limiter.

BTW: remove duplicate code checking bot signature ``re_bot.match(user_agent)``

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 509afbbb84 [fix] engine seznam: fix issues reported by black & pylint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Venca24 c8d78355ff [fix] engine seznam 1 year ago
dependabot[bot] b99e028ed0
Bump sharp from 0.31.3 to 0.32.0 in /searx/static/themes/simple
Bumps [sharp](https://github.com/lovell/sharp) from 0.31.3 to 0.32.0.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.31.3...v0.32.0)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
1 year ago
Markus Heiser 68703ba22e
Merge pull request #2282 from searxng/dependabot/npm_and_yarn/searx/static/themes/simple/master/ionicons-7.1.0
Bump ionicons from 6.1.3 to 7.1.0 in /searx/static/themes/simple
1 year ago
searxng-bot c1c24fc231 [translations] update from Weblate
17ad1118 - 2023-03-29 - return42 <markus.heiser@darmarit.de>
61446791 - 2023-03-29 - return42 <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 270ad18897 [fix] engine flickr: adapt to the new data model from flicker's response
Closes: https://github.com/searxng/searxng/issues/1879
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser 2b8dfab33f [fix] engine gigablast: add &userid=<User ID>&code=<Feed Code>
Gigablast's API does block unauthorized request[1].

[1] https://gigablast.com/searchfeed.html

Closes: https://github.com/searxng/searxng/issues/1454
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
1 year ago
Markus Heiser d179b62cf5
Merge pull request #2288 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
1 year ago
Markus Heiser 381c6751d6
Merge pull request #2289 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
1 year ago
Markus Heiser fc51d9a0fe
Merge pull request #2291 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
1 year ago
Markus Heiser 2fbe4ab0c0
Merge pull request #2292 from searxng/update_data_update_engine_descriptions.py
Update searx.data - update_engine_descriptions.py
1 year ago
dalf 4c80340b62 Update searx.data - update_engine_descriptions.py 1 year ago
dalf b39ce7ff82 Update searx.data - update_currencies.py 1 year ago
dalf 814ac8cacb Update searx.data - update_ahmia_blacklist.py 1 year ago