Commit graph

3664 commits

Author SHA1 Message Date
Martin Fischer def62c3a47 [typing] add type hints for dictionaries 2022-01-17 11:42:48 +01:00
Martin Fischer 6d43cf7952 [typing] add optional attrs to Plugin 2022-01-17 11:42:48 +01:00
Martin Fischer fdf562bc32 [typing] add results.Timing 2022-01-17 11:42:48 +01:00
Martin Fischer 1ed618222f [typing] add ExtendedRequest
webapp.py monkey-patches the Flask request global.
This commit adds a type cast so that e.g. Pyright[1]
doesn't show "Cannot access member" errors everywhere.

[1]: https://github.com/microsoft/pyright
2022-01-17 11:18:17 +01:00
Alexandre Flament 0c036ae294
Merge pull request #750 from dalf/simple-rtl
Simple theme: implement RTL
2022-01-16 20:29:34 +01:00
Alexandre Flament e07417848f
Merge pull request #695 from return42/fix-sp
[fix] startpage engine / modified API
2022-01-16 20:27:36 +01:00
Alexandre Flament 468619abcb [build] /static 2022-01-16 18:52:46 +01:00
Alexandre Flament d000288ad0 [enh] simple theme: RTL support
* mirror all inline SVGs so that direction SVGs display correctly on RTL
* set the bold list element in info box to RTL so the colon gets displayed on the right side
* set correct .ltr function for the left border on the search button in #q
* move text to the right in autocomplete
* move search form in lign with result article on RTL
* add the correct padding for img thumbnails in categories like music on RTL
* apply RTL to result table for map results
* align text in tables part of /preferences on RTL
* move burger menu on index page to the left on RTL
* fix positioning of drop down arrow on select boxes on RTL
* align result URL on the right (written LTR)
* align vim hotkeys help on the left since it is not translated
* image detail:
  * labels (author, format, URL, etc...) are written on the right,
    values are on the left.
  * URL are written LTR and overflow on the right
2022-01-16 18:51:11 +01:00
Alexandre Flament 2084d7b1ed [mod] simple theme: change stylelint configuration
* disable declaration-empty-line-before
  https://stylelint.io/user-guide/rules/list/declaration-empty-line-before/
  this change allows to mix CSS declarations and LESS mixins without empty lines:

  #something {
    display: flex;
    .ltr-left(60rem); // no mandatory empty line before this one
  }

* disable no-invalid-position-at-import-rule
  https://stylelint.io/user-guide/rules/list/no-invalid-position-at-import-rule/

  this change allows to declare some mixins and then import another .less file:
  for example:

  .ltr-left(@offset) {
    left: @offset;
  }
  @import "style.less";
2022-01-16 18:50:19 +01:00
Alexandre Flament f9271d595f [fix] startpage: workaround to use the startpage network
workaround for the issue #762
2022-01-15 22:56:34 +01:00
Alexandre Flament 32874dbf7f
Merge pull request #742 from return42/mysql
[mod] engine mysql_server: make port configurable
2022-01-15 21:35:34 +01:00
Martin Fischer 599d882d0a
Merge pull request #754 from return42/fix-751
[theme] /preferences: rename "Method" to "HTTP Method"
2022-01-14 18:42:49 +01:00
Markus Heiser 580815a9a5 [fix] stop less grunt runner on missing files
The less grunt runner silently ignore missing files and continue with the build[1]::

    Running "less:production" (less) task
    >> Destination css/searxng.min.css not written because no source files were found.
    >> 1 stylesheet created.
    >> 1 sourcemap created.

Add filter function that calls grunt.fail() if the scr file does not exists.

[1] https://github.com/searxng/searxng/pull/750#discussion_r784357031
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 13:16:24 +01:00
Markus Heiser 08b38a8bfd [fix] simple theme: description of HTTP method
Suggested-by: @not-my-profile https://github.com/searxng/searxng/pull/754#issuecomment-1012921096
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 10:07:09 +01:00
Markus Heiser e45dfb334b [theme] /preferences: rename "Method" to "HTTP Method"
Closes: https://github.com/searxng/searxng/issues/751
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 08:29:04 +01:00
searxng-bot ce018d013b [translations] update from Weblate
0ca15e28 - 2022-01-11 - Allan Nordhøy <epost@anotheragency.no>
dd494ce7 - 2022-01-11 - Markus Heiser <markus.heiser@darmarit.de>
7e4e914a - 2022-01-10 - k2s <martin.minka@gmail.com>
b4915a2f - 2022-01-10 - Markus Heiser <markus.heiser@darmarit.de>
832d5cf9 - 2022-01-13 - Genghis Khan <genghiskhan@gmx.ca>
546ad69a - 2022-01-08 - Alexandre Flament <alex@al-f.net>
f14bd241 - 2022-01-09 - Markus Heiser <markus.heiser@darmarit.de>
2815009a - 2022-01-07 - Markus Heiser <markus.heiser@darmarit.de>
2022-01-14 07:17:46 +00:00
Martin Fischer d9709df740 [fix] make BooleanChoices only set cookies that vary from the default
The bug was inadvertently introduced by the refactor in
180d4d068b.

Fixes #746.
2022-01-13 19:43:49 +01:00
Alexandre Flament 687bdef410
Merge pull request #740 from return42/fix-bang
[fix] get_bang_url: handle ambiguous !!bangs without error
2022-01-12 22:00:18 +01:00
Markus Heiser a7c3c352d8 [upd] searx/data/external_bangs.json
Updated external bangs by::

    ./manage pyenv.cmd ./searxng_extra/update/update_external_bangs.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 19:37:13 +01:00
Markus Heiser 7cdd31440e [fix] external bangs: don't overwrite Bangs in data trie
Bangs with a `*` suffix (e.g. `!!d*`) overwrite Bangs with the same
prefix (e.g. `!!d`) [1].  This can be avoid when a non printable character is
used to tag a LEAF_KEY.

[1] https://github.com/searxng/searxng/pull/740#issuecomment-1010411888

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 19:37:13 +01:00
Markus Heiser 50c4b58db6 [hotfix] interim fix to get docker-build of CI without issues
There is an issue with redis v4.1.0 [1] / for the interim lets remove this
python dependency.

[1] https://github.com/searxng/searxng/issues/741

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-12 09:31:12 +01:00
Martin Fischer cd8ce22f86 [themes] add comma before "but" in new sentence
Closes #739.
2022-01-12 08:26:23 +01:00
Markus Heiser bf593af423 [mod] engine mysql_server: make port configurable
Cherry piked from https://github.com/searx/searx/commit/82ac634070

Suggested-by: https://github.com/searx/searx/issues/3117
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11 23:47:40 +01:00
Markus Heiser 977e9a4330
Merge pull request #686 from return42/lib_redis
Add redis DB and connector
2022-01-11 19:55:14 +01:00
Markus Heiser 6d7e86eece [fix] get_bang_url: handle ambiguous !!bangs without error
An ambiguous bang like `!!d` raises an exception in function get_bang_url().  A
bang is only unique when the bang_definition from get_bang_definition_and_ac() is
a string / for a ambiguous bang the returned bang_definition is a dictionary.

Reported-by: user prg at #searxng:matrix.org on 2022/01/11
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11 09:58:10 +01:00
Markus Heiser 3457408285 [build] /static 2022-01-10 17:42:13 +01:00
Markus Heiser 85159ad307 [fix] autocomple.js: register li.onmousedown instead li.onclick
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 17:30:57 +01:00
Markus Heiser 6420322cd1
Merge pull request #729 from k2s/fix-tokens
fix(security): filtered_engines were not correctly evaluating validate_token()
2022-01-10 11:51:45 +01:00
Markus Heiser df238e944c [mod] starpage engine: add comment about Startpage's FFox add-on
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 21e884f369 [fix] startpage engine: fetch CAPTCHA & issues related to PR-695
In case of CAPTCHA raise a SearxEngineCaptchaException and suspend for 7 days.
When get_sc_code() fails raise a SearxEngineResponseException and suspend for 7
days.

[1] https://github.com/searxng/searxng/pull/695

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 2f4e567e90 [fix] Get an actual sc argument from startpage's home page.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser 1cbcddb3f7 [pylint] Startpage engine
Fix remarks from pylint

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:38 +01:00
Markus Heiser f1f5e69c42 [fix] startpage engine - avoid captcha
Startpage has introduced new anti-scraping measures that make SearXNG instances
run into captchas:

1. some arguments has been removed and a new `sc` has been added.
2. search path changed from `do/search` to `sp/search`
3. POST request is no longer needed

Closes: https://github.com/searxng/searxng/issues/692
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-10 11:22:12 +01:00
Martin Fischer 576e19dad1 [fix] add default for "about" engine property
Fixes #732.
2022-01-10 08:40:06 +01:00
Martin Minka b76a815827 [fix] filtered_engines were not correctly evaluating validate_token() 2022-01-09 15:53:58 +01:00
Markus Heiser dca83944b5 [fix] redis: don't create a new connection at each client() call
Suggested-by: @dalf https://github.com/searxng/searxng/pull/686#pullrequestreview-844942973
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 17:33:40 +01:00
Markus Heiser 4fc5e5299c [fix] ccengine engine - avoid unwanted redirects
api.openverse.engineering is a little picky and wants to have a trailing slash
in the path:

    /v1/images? -->/ v1/images/?

otherwise it redirects, here is the debug log:

    DEBUG   searx.network.openverse       : HTTP Request: GET https://api.openverse.engineering/v1/images?&page=1&page_size=20&format=json&q=foo "HTTP/2 301 Moved Permanently" (text/html; charset=utf-8)
    DEBUG   searx.network.openverse       : HTTP Request: GET https://api.openverse.engineering/v1/images/?&page=1&page_size=20&format=json&q=foo "HTTP/2 200 OK" (application/json)
    WARNING searx.engines.openverse       : ErrorContext('searx/search/processors/online.py', 105, 'count_error(', None, '1 redirects, maximum: 0', ('200', 'OK', 'api.openverse.engineering')) True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 14:14:31 +01:00
Markus Heiser 1461d6a07e [upd] engine_descriptions.json
Updated by:

    ./manage pyenv.cmd python3 \
        ./searxng_extra/update/update_engine_descriptions.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 13:59:03 +01:00
Léon Tiekötter 37baf46ece [fix] Rename ccengine engine to openverse
The CC engine was merged with WordPress and renamed to Openverse

Source: https://wordpress.org/news/2021/05/welcome-to-openverse/
2022-01-07 13:06:05 +01:00
Léon Tiekötter 4be6deb0a1 [fix] ccengine engine
Change domain to api.openverse.engineering
2022-01-07 13:01:37 +01:00
Markus Heiser ced656606f
Merge pull request #709 from return42/drop-etools
[fix] drop etools engine module
2022-01-07 11:18:47 +01:00
Markus Heiser 5dd3442f83 [fix] drop etools engine module
The implementation of the etools engine is poor.  No date-range support, no
language support and it is broken by a CAPTCHA.

etools is a metasearch engine, the major search engines it supports (google,
bing, wikipedia, Yahoo) are already available in SeaarXNG.

While etools does support several engines we currently don't support directly,
support for them should be added directly to SearXNG if there is demand.

In practice: in SearXNG the worse etools results will be mixed with good results
from other engines we have (as long as there is no captcha).

At best case, what we win with etools is in e.g. results from de.ask.com in a
query from a german request .. in all other cases worse results are bubble up in
SearXNG's result list.

[1] https://github.com/searxng/searxng/issues/696#issuecomment-1005855499

Closes: https://github.com/searxng/searxng/issues/696
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 10:41:09 +01:00
Martin Fischer e12525a1fa
Merge pull request #708 from not-my-profile/pref-refactor
Refactor `preferences`
2022-01-07 09:45:23 +01:00
Markus Heiser 2eb95f1532
Merge pull request #718 from searxng/dependabot/pip/master/pygments-2.11.2
Bump pygments from 2.11.0 to 2.11.2
2022-01-07 08:40:55 +01:00
Markus Heiser c956ed6c43 [build] /static 2022-01-07 08:36:32 +01:00
Markus Heiser d8db85638e make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 08:35:14 +01:00
searxng-bot 651342d71a [translations] update from Weblate
7781625e - 2022-01-06 - Linerly <linerly@protonmail.com>
dcab2ef1 - 2022-01-06 - Markus Heiser <markus.heiser@darmarit.de>
2022-01-07 07:17:58 +00:00
Léon Tiekötter 3ab826de22 Drop microsoft academic engine
Microsoft academic was discontinued on 2021-12-31.

Source: https://www.microsoft.com/en-us/research/project/academic/articles/microsoft-academic-to-expand-horizons-with-community-driven-approach/
2022-01-07 01:35:13 +01:00
Martin Fischer 180d4d068b [refactor] refactor SwitchableSetting
The previous implementation used two hash sets and a list.
... that's not necessary ... a single hash map suffices.

And it's also less error prone ... because the previous data structure
allowed a setting to be enabled and disabled at the same time.
2022-01-06 18:56:02 +01:00
Martin Fischer 56fbf22108 [refactor] stop SwitchableSetting from subclassing Setting
Previously the default_value was abused for the cookie name.
Having SwitchableSetting subclass Setting doesn't even make sense
in the first place since none of the Setting methods apply.
2022-01-06 18:13:13 +01:00
Martin Fischer 1196abcfce
Merge pull request #706 from not-my-profile/remove-broken-quest-op
[fix] remove broken ? search operator
2022-01-06 17:44:34 +01:00
Martin Fischer a0486cf827 [fix] prevent leaflet.{css,js} from polluting git grep results
Fixes #704.
2022-01-06 14:33:19 +01:00
Martin Fischer 83f8a8fc6d [refactor] remove pointless tuple 2022-01-06 14:21:15 +01:00
Martin Fischer bb06758a7b [refactor] add type hints & remove Setting._post_init
Previously the Setting classes used a horrible _post_init
hack that prevented proper type checking.
2022-01-06 14:21:14 +01:00
Martin Fischer 61935c72ef [fix] remove broken ? search operator
The ? search operator has been broken for some time and
currently only raises the question why it's still there.

## Context ##

The query "Paris !images" searches for "Paris" in the "images" category.

Once upon a time Searx supported "Paris ?images" to search for "Paris"
in the currently enabled categories and the "images" category.

The feature makes sense ... the ? syntax does not.
We will hopefully introduce a +!images syntax in the future.

Fixes #702.
2022-01-06 14:10:58 +01:00
Alexandre Flament 03189d60f4
Merge pull request #697 from searxng/remove-nl-be
Delete searx/translations/nl_BE
2022-01-06 09:26:12 +01:00
Alexandre Flament aedd6279b3
Merge pull request #634 from not-my-profile/powered-by
Introduce `categories_as_tabs` & group engines in tabs
2022-01-06 09:22:02 +01:00
Alexandre Flament 40684f6b5e
Delete searx/translations/nl_BE
See https://github.com/searxng/searxng/issues/540
2022-01-05 20:36:24 +01:00
Markus Heiser 0ebad8220f
Merge pull request #688 from dalf/settings_enable_stats
[enh] settings.yml: implement general.enable_metrics
2022-01-05 18:53:49 +00:00
Alexandre Flament 9004e84b6e
Merge pull request #596 from dalf/upgrade-httpx
Upgrade httpx
2022-01-05 19:13:48 +01:00
Alexandre Flament d3ecadd3f8
Merge pull request #679 from dalf/brand-searxng
searxng.org: update setup.py & settings.yml
2022-01-05 19:07:53 +01:00
Alexandre Flament 2134703b4b [enh] settings.yml: implement general.enable_metrics
* allow not to record metrics (response time, etc...)
* this commit doesn't change the UI. If the metrics are disabled
  /stats and /stats/errors will return empty response.
  in /preferences, the columns response time and reliability will be empty.
2022-01-05 19:03:04 +01:00
Alexandre Flament e64c3deab7 [mod] upgrade httpx 0.21.2
httpx 0.21.2 and httpcore 0.14.4 fix multiple issues:
* https://github.com/encode/httpx/releases/tag/0.21.2
* https://github.com/encode/httpcore/releases/tag/0.14.4

so most of the workarounds in searx.network have been removed.
2022-01-05 18:46:00 +01:00
Martin Fischer a4c2cfb837 [enh] change categories_as_tabs from a list to a dict
The tab icon names are currently hard coded in the templates.
This commit lets us introduce an icon property in the future, e.g:

categories_as_tabs:
  general:
    icon: search-outline
2022-01-05 11:03:44 +01:00
Martin Fischer b38036d519 [fix] stop setting superfluous cookies for "non tab categories" 2022-01-05 11:03:44 +01:00
Martin Fischer 3dd534e5c0 [refactor] make group_engines_in_tab more readable 2022-01-05 11:03:44 +01:00
Martin Fischer d01e8aa8cc [mod] introduce searx.engines.Engine for type hinting 2022-01-05 11:03:44 +01:00
Martin Fischer 3f76c9c96c [enh] enable English dictionaries by default
These dictionaries are no longer part of the general category,
so they're no longer queried by default -> we can enable them
by default without degrading general query performance.
2022-01-05 11:03:44 +01:00
Martin Fischer abe53946d4 [enh] display help text for "Other" engines tab in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 6f07d51b62 [mod] improve variable name 2022-01-05 11:03:44 +01:00
Martin Fischer 1e195f5b95 [mod] move group_engines_in_tab to searx.webutils 2022-01-05 11:03:44 +01:00
Martin Fischer 5d74bf3820 [enh] move dictionaries, Erowid & IMDb out of general category
The general category is the category that is searched by default.
From a privacy standpoint it doesn't make sense to send all general
queries to specialized search engines that cannot deal with those
queries anyway.
2022-01-05 11:03:44 +01:00
Martin Fischer ab90e2ac49 [enh] show categories not in any tab category in "Other" preferences tab
Previously we didn't have a good place to put search engines that don't
fit into any of the tab categories. This commit automatically puts
search engines that don't belong to any tab category in an "other"
category, that is only displayed in the user preferences (and not above
search results).
2022-01-05 11:03:44 +01:00
Martin Fischer 4ac6b5d32d [build] /static 2022-01-05 11:03:44 +01:00
Martin Fischer a12cb6a807 [simple] improve styling of subcategory table headers in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 20a5e43e35 [enh] display language of engines in preferences 2022-01-05 11:03:44 +01:00
Martin Fischer 31e206361f [enh] group engines in preference tabs 2022-01-05 11:03:44 +01:00
Martin Fischer b02f762687 [enh] add more categories 2022-01-05 11:00:11 +01:00
Markus Heiser d7b4306444 [fix] links in comments - https://docs.searxng.org/
fixed links from https://searxng.github.io/searxng/ to https://docs.searxng.org/
2022-01-04 16:04:49 +01:00
Markus Heiser a6cfab93fa [enh] add redis connector searx/shared/redisdb.py
Add a redis connector, the default DB connector is a socket at::

    unix:///usr/local/searxng-redis/run/redis.sock?db=0

To set up a redis instance simply use::

    $ ./manage redis.build
    $ sudo -H ./manage redis.install

A hint for developers:

To get access rights to this instance, your developer account needs to be added
to the *searxng-redis* group::

    $ sudo -H ./manage redis.addgrp "${USER}"
    # don't forget to logout & login to get member of group

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-03 20:56:39 +01:00
Alexandre Flament 41ae5aea2b [fix] disabling all engines in a category makes the bang search in general
with this commit, there is no result
2022-01-03 20:23:46 +01:00
Martin Fischer 8e9ad1ccc2 [enh] introduce categories_as_tabs
Previously all categories were displayed as search engine tabs.
This commit changes that so that only the categories listed under
categories_as_tabs in settings.yml are displayed.

This lets us introduce more categories without cluttering up the UI.
Categories not displayed as tabs  can still be searched with !bangs.
2022-01-03 07:01:49 +01:00
Martin Fischer df34b1ddcf [enh] settings.yml: allow granular overwrites for about 2022-01-03 07:01:49 +01:00
Martin Fischer 8a0810cedc [fix] bang syntax for categories with spaces 2022-01-03 07:01:49 +01:00
Alexandre Flament 458b7fb72d
Merge pull request #610 from return42/img-load-error
[fix] simple theme: hide the image if img load fails
2022-01-02 22:34:15 +01:00
Alexandre Flament d83aa2b0d2
Merge pull request #613 from return42/pylint-bing-images
[pylint] Bing (Images) engine
2022-01-02 22:00:55 +01:00
Alexandre Flament 76cbfbbdda reference docs.searxng.org 2022-01-02 21:18:29 +01:00
Markus Heiser 3cdf2d6570 Update searx.data - update_languages.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-01 18:37:35 +01:00
Markus Heiser 21d7c8b367
Merge pull request #676 from return42/fix-bing-lang
Fix issues on running update_languages.py
2022-01-01 18:12:47 +01:00
Markus Heiser 61ce0c2244 [fix] bing engines: fetch_supported_languages
The Request to and the Response from https://www.bing.com/account/general has
been changed.

[1] https://github.com/searxng/searxng/pull/672#discussion_r777104919

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-01 17:31:38 +01:00
Alexandre Flament 6b49f32d3e
Merge pull request #670 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2022-01-01 12:16:50 +01:00
Markus Heiser 3dcba2f67c
Merge pull request #671 from searxng/update_data_update_ahmia_blacklist.py
Update searx.data - update_ahmia_blacklist.py
2022-01-01 12:08:26 +01:00
Markus Heiser 877293c470
Merge pull request #673 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-01-01 12:08:02 +01:00
dalf 127da09fc9 Update searx.data - update_wikidata_units.py 2022-01-01 06:25:06 +00:00
dalf 291483af53 Update searx.data - update_currencies.py 2022-01-01 06:25:02 +00:00
dalf a0016250ec Update searx.data - update_ahmia_blacklist.py 2022-01-01 06:24:59 +00:00
dalf 184242d36b Update searx.data - update_firefox_version.py 2022-01-01 06:24:49 +00:00
Markus Heiser 021b4a0a02
Merge pull request #667 from searxng/dependabot/pip/master/pygments-2.11.0
Bump pygments from 2.10.0 to 2.11.0
2021-12-31 09:29:29 +01:00
Markus Heiser efbcaaab3b [build] /static 2021-12-31 09:14:38 +01:00
Markus Heiser 391e4b57c9 make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-31 09:12:22 +01:00
searxng-bot db4885f7d4 [translations] update from Weblate
055a6080 - 2021-12-28 - Markus Heiser <markus.heiser@darmarit.de>
d028dfd7 - 2021-12-26 - Gert-dev <gert+github@disroot.org>
d2f3b998 - 2021-12-24 - Markus Heiser <markus.heiser@darmarit.de>
1b882f56 - 2021-12-29 - VaiTon <eyadlorenzo@gmail.com>
f8e524a3 - 2021-12-27 - Markus Heiser <markus.heiser@darmarit.de>
70eafa9c - 2021-12-26 - Frederik From <frederikfrom@pm.me>
7eb20cec - 2021-12-28 - Markus Heiser <markus.heiser@darmarit.de>
3cb754a4 - 2021-12-25 - Markus Heiser <markus.heiser@darmarit.de>
2021-12-31 07:17:50 +00:00
Markus Heiser f087d01e24 [build] /static 2021-12-29 14:33:54 +01:00
Markus Heiser f75199b1ec [fix] simple theme: hide the image if img load fails
Add event listener to query selector::

    '#urls img.image'

From the user point of view, I think it is better to hide the image:
img_load_error.svg is helplful in the image category because it still allows to
select the image. IMO, in the news category, the fact there is a missing image
won't help to choose the links. From a developer point of view, the place holder
is signal that may be the engine needs to be updated (at least give a look). The
browser console should show the same information too, but it requires some
additional steps. [1]

[1] https://github.com/searxng/searxng/pull/610#issuecomment-997640132

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-29 14:30:16 +01:00
Markus Heiser 7966fd3bbd
Merge pull request #663 from dalf/mod_secret_key
changes about the secret_key
2021-12-29 13:33:27 +01:00
Markus Heiser 8f3a7feb47 [mod] implement is_hmac_of() in webutils / close to new_hmac()
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>, Alexandre Flament
2021-12-28 23:04:06 +01:00
Markus Heiser dc4f1f705d [pylint] Bing (Images) engine
Fix remarks from pylint and remove obsolete try/except block

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-28 14:43:39 +01:00
Markus Heiser 6d7a38a912 [pylint] Bing (Videos) engine
Fix remarks from pylint and remove obsolete try/except block

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-28 14:33:05 +01:00
Alexandre Flament 7d4834ac4d [mod] webutils.py: remove dead code
secret_key can't be bytes (see settings_default.py)
2021-12-28 10:14:38 +01:00
Alexandre Flament d784870209 [fix] use hmac.compare_digest instead of ==
see https://docs.python.org/3/library/hmac.html#hmac.HMAC.hexdigest
2021-12-28 08:36:31 +01:00
Markus Heiser d84226bf63 [fix] issues reported by pylint
Fix pylint issues from commit (3d96a983)

    [format.python] initial formatting of the python code

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 10:16:20 +01:00
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:26:22 +01:00
Markus Heiser fcdc2c2cd2 [format.python] disable py code formatting for some hunks of code
Disable the python code formatting from python-black, where the readability of
code suffers by formatting.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27 09:16:03 +01:00
searxng-bot 568a4df297 [translations] update from Weblate
14044898 - 2021-12-19 - Linerly <linerly@protonmail.com>
2db5cc5d - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
7273ced4 - 2021-12-22 - Markus Heiser <markus.heiser@darmarit.de>
bac8f580 - 2021-12-19 - Stephan Wijman <s.wijman@mailarena.net>
472c882a - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
bc2c60a4 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
11f37c00 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
10417e8a - 2021-12-22 - Mico Hautaluoma <m@mha.fi>
12d49b4b - 2021-12-22 - Markus Heiser <markus.heiser@darmarit.de>
a1bfd8f6 - 2021-12-23 - Markus Heiser <markus.heiser@darmarit.de>
fa94d205 - 2021-12-17 - Markus Heiser <markus.heiser@darmarit.de>
6a121417 - 2021-12-21 - YFdyh000 <yfdyh000@gmail.com>
bc9b6947 - 2021-12-18 - Shahed Hosseini <sajjadhusseini92@gmail.com>
2021-12-24 07:18:11 +00:00
Martin Fischer 19339067c6 [del] remove geektimes (redirects to habrahabr) 2021-12-22 13:20:56 +01:00
Martin Fischer fb037e7a83 [del] remove whaleslide (website is down)
Closes #639.
2021-12-22 13:19:27 +01:00
Martin Fischer e28c6bda35 [doc] introduce about.language and sort engines by it 2021-12-21 09:58:51 +01:00
Markus Heiser c5d604f06f [upd] engine_descriptions.json
Updated by:

    ./manage pyenv.cmd python3 \
        ./searxng_extra/update/update_engine_descriptions.py

Include documentation of new added engines:

- superuser
- stackoverflow
- askubuntu
- indb
- ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-20 14:39:10 +01:00
Markus Heiser 6fb6e8c22a
Merge pull request #621 from not-my-profile/engines-table
[doc] Improve engines table
2021-12-20 14:02:29 +01:00
Martin Fischer 1fb1cca519 [doc] fix about.website for hoogle 2021-12-20 12:12:09 +01:00
Markus Heiser 7a215e07e7
Merge pull request #611 from return42/fix-bing
[fix] bing engine: fix paging support, show inital page.
2021-12-20 10:08:52 +01:00
Martin Fischer 06beffdf31 [doc] add about.website for wiby 2021-12-20 07:59:51 +01:00
Alexandre Flament b5d4cac7e1
Merge pull request #615 from return42/pylint-reddit
[pylint] Reddit engine
2021-12-19 11:32:32 +01:00
mrpaulblack c6b76aa429 [build] /static 2021-12-18 21:25:22 +01:00
mrpaulblack 414f1039d2 [fix] theme: build img_load_error.svg as svg 2021-12-18 21:24:59 +01:00
Markus Heiser 2af50c2588 [pylint] Reddit engine
Add Reddit engine to pylint process

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 17:59:47 +01:00
Markus Heiser 6b85607274 [fix] bing engine: fix paging support, show inital page.
Follow up queries for the pages needed to be fixed.

- Split search-term in one for initial query and one for following queries.
- Set some headers in HTTP requests, bing needs for paging support.
- IMO //div[@class="sa_cc"] does no longer match in a bing response.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 13:50:38 +01:00
Markus Heiser b2177e5916 [pylint] Bing (Web) engine
Fix remarks from pylint and improved code-style.  In preparation for a bug-fix
of the Bing (Web) engine I add this engine to the pylint-list.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18 13:40:36 +01:00
Alexandre Flament 4da1e0026c
Merge pull request #609 from return42/fix-bing-news
[fix] engine bing-news: replace the http:// by https://
2021-12-18 00:01:40 +01:00
Markus Heiser f41734a543 [fix] engine bing-news: replace the http:// by https://
BTW: add bing_news to the pylint process

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-17 13:25:50 +01:00
Alexandre Flament f6b1264b5f
Merge pull request #584 from return42/drop-css-vendor
[mod] simple-theme: remove vendor CSS
2021-12-17 12:14:19 +01:00
searxng-bot 3cf9065478 [translations] update
1a891c16 - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
33bd07e7 - 2021-12-14 - Alexandre Flament <alex@al-f.net>
7ba24343 - 2021-12-12 - Markus Heiser <markus.heiser@darmarit.de>
80d54b89 - 2021-12-15 - FilGiov <quota679@gmail.com>
af9e007c - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
9d4e645c - 2021-12-15 - Markus Heiser <markus.heiser@darmarit.de>
21dec08c - 2021-12-15 - Shahed Hosseini <sajjadhusseini92@gmail.com>
2021-12-17 07:17:56 +00:00
Alexandre Flament 6bb6f7ffc1
Merge pull request #602 from return42/fix-600
[fix] move engines gpodder and AZlyrics into category music
2021-12-16 18:18:16 +01:00
Markus Heiser 07f2a9ee3c [fix] engine: MediathekViewWeb (mvw) disable by default
The MediathekViewWeb delivers only content for the german speaking area.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 19:03:35 +01:00
Markus Heiser 84836a5000 [build] /static 2021-12-15 14:47:43 +01:00
Markus Heiser c020b90056 [mod] simple theme: remove vendor prefix of width: max-content
Remove no longer needed workarounds like `width: 1000px;`
and vendor prefix of max-content [1].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/max-content#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 459f33a18e [mod] simple-theme: remove vendor CSS
flexbox
  Browser support for flexbox is excellent, and the majority of browsers do not
  need a prefix at this point. Safari was the last of the major browsers to
  remove prefixes, with the release of Safari 9 in 2015. [1]

user-select:
  Vendor prefix of user-select is not needed, see 'Browser compatibility' [2].

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox#status_in_browsers
[2] https://developer.mozilla.org/en-US/docs/Web/CSS/user-select#browser_compatibility

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 14:43:15 +01:00
Markus Heiser 715f578cda [build] /static 2021-12-15 10:45:25 +01:00
Markus Heiser c416464949 [fix] lazy loading of <img> tags
Images should include dimension attributes.  Without `width` and `height`
specified, image dimensions are 0×0 pixels at first.  ...  In this case the
browser determines that all of them are visible to the user and decides to load
everything [1].

In CSS the `width` is set to a value and the `height` is unsed to scale the image
proportional in both dimensions.

[1] https://web.dev/browser-level-image-lazy-loading/#images-should-include-dimension-attributes
[2] https://caniuse.com/loading-lazy-attr

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 10:39:55 +01:00
Markus Heiser 709482088e [fix] move engines gpodder and AZlyrics into category music
Closes: https://github.com/searxng/searxng/issues/600
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-15 09:43:56 +01:00
Markus Heiser f287787c44 [simple theme] activate - SearXNG JavaScript Style Guide
Add the 'SearXNG JavaScript Style Guide' as one quality gate in the build chain
of the simple theme::

    make themes.simple
    make themes.simple.test

In the github CI the `themes.all` target enforce a `themes.simple`.

BTW: Remove 'jshint' left overs from 0ee316f3d

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:50:53 +01:00
Markus Heiser 34f5e9c7a3 [fix] eslint --fix
automatically fix some of the problems reported by eslint rules::

    $ ./manage nvm.bash
    nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:31:58 +01:00
Markus Heiser 32cf24a272 [mod] eslint: add gruntfile.js to the files to lint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 07:26:41 +01:00
Markus Heiser 06730588a6 [mod] SearXNG JavaScript Style Guide (eslint:recommended)
The SearXNG JavaScript Style Guide is a set of eslint rules [1] based on the
eslint:recommended [2] rules.

    "extends": "eslint:recommended"

The additional rules adopted from the JavaScript Standard Style [3][4].

[1] https://eslint.org/docs/rules/
[2] https://github.com/kunalgolani/eslint-config/tree/master/packages/recommended
[3] https://standardjs.com/rules.html#javascript-standard-style
[4] https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14 06:50:26 +01:00
Markus Heiser 9fc27088ef
Merge pull request #583 from return42/fix-combo-with
[fix] simple theme: remove width  45% from language and time filters
2021-12-12 17:02:31 +01:00
Markus Heiser 8cc7c880ae
Merge pull request #587 from dalf/fix-gigablast
[fix] gigablast engine
2021-12-12 15:58:13 +01:00
searxng-bot b994471233 [translations] update
030f3e59 - 2021-12-11 - Linerly <linerly@protonmail.com>
cedb4f9d - 2021-12-11 - Alexandre Flament <alex@al-f.net>
8522e4cf - 2021-12-11 - Alexandre Flament <alex@al-f.net>
2021-12-11 18:11:41 +00:00
searxng-bot 5bf16d56f4 [translations] update
10790ace - 2021-12-05 - Alexandre Flament <alex@al-f.net>
0026bde6 - 2021-12-07 - Naveen <naveen.translator@protonmail.com>
e066d8cf - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
174b9f9c - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
0817e645 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
6272320f - 2021-12-08 - Alexandre Flament <alex@al-f.net>
e1281900 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
882ced80 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
59e8c950 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
cfd72d00 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
8f3d6058 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
b293c351 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
840e1a98 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
9f045c63 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
e24a23e0 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
bf58a870 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
6b5e4993 - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
dc9ab819 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
b8b1423b - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
fbfe865c - 2021-12-03 - Markus Heiser <markus.heiser@darmarit.de>
afa65a98 - 2021-12-04 - Markus Heiser <markus.heiser@darmarit.de>
dded218c - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
79659920 - 2021-12-05 - Markus Heiser <markus.heiser@darmarit.de>
5a4100dc - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
57fb7a91 - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
33eb893d - 2021-12-05 - Taufik Hidayat <tfkhdyt@pm.me>
2673c748 - 2021-12-03 - Alexandre Flament <alex@al-f.net>
2021-12-10 07:17:45 +00:00
Alexandre Flament 2a262df0bb
Merge pull request #582 from return42/fix-autocomplete-csp
[fix] simple theme: make autocomplete-js CSP compliant
2021-12-08 20:28:35 +01:00
Markus Heiser b5c9cc4ff3
Merge pull request #586 from dalf/remove-yggtorrent
[del] remove yggtorrent
2021-12-07 07:00:47 +01:00
Alexandre Flament 1a6207574e [fix] gigablast engine
fetch extra params after 3000 seconds
2021-12-06 22:55:15 +01:00