Compare commits

...

310 commits

Author SHA1 Message Date
Jinyuan Huang 250e691ceb improve "search existing issues from github" link 2024-04-27 19:53:03 +02:00
Markus Heiser 648f43be1d [build] /static 2024-04-27 18:26:23 +02:00
Bnyro 3ea278aff4 [feat] preferences: button to enable/disable all engines 2024-04-27 18:26:23 +02:00
Bnyro 46efb2f36d [feat] plugins: new unit converter plugin 2024-04-27 18:11:33 +02:00
Bnyro b3b1258e4e [data] wikidata: update wikidata_units.json 2024-04-27 18:11:33 +02:00
dependabot[bot] 1e1fb59bea [upd] pypi: Bump sphinx from 7.2.6 to 7.3.7
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 7.2.6 to 7.3.7.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES.rst)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v7.2.6...v7.3.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 10:05:51 +02:00
Markus Heiser d593055888 [fix] ionic.io/ionicons - add back missing class="ionicon"
Seems to me svg2jinja added the class in the past .. but no longer in new builds
/ this patch adds the class back by using addAttributesToSVGElement [1].

To test this patch use:

    $ ./manage themes.simple
    $ cat searx/templates/simple/icons.html

and check `class="ionicon"` is in the outer `<svg ..>` tags.

[1] https://svgo.dev/docs/plugins/add-attributes-to-svg-elements/
[2] https://ionic.io/ionicons

Closes: https://github.com/searxng/searxng/issues/3383
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-27 09:33:20 +02:00
Bnyro 42b58eb448 [feat] media.ccc.de: implement module with pagination and iframe 2024-04-27 08:55:26 +02:00
dependabot[bot] a56b4a1648 [upd] pypi: Bump pallets-sphinx-themes from 2.1.1 to 2.1.2
Bumps [pallets-sphinx-themes](https://github.com/pallets/pallets-sphinx-themes) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/pallets/pallets-sphinx-themes/releases)
- [Changelog](https://github.com/pallets/pallets-sphinx-themes/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/pallets-sphinx-themes/compare/2.1.1...2.1.2)

---
updated-dependencies:
- dependency-name: pallets-sphinx-themes
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:30:17 +02:00
dependabot[bot] 4719c004ea [upd] pypi: Bump redis from 5.0.3 to 5.0.4
Bumps [redis](https://github.com/redis/redis-py) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-27 08:24:23 +02:00
Ivan G 0e09014df5
Add uWSGI die-on-term flag (#3429) 2024-04-26 23:42:29 +02:00
searxng-bot 41f415aabf [l10n] update translations from Weblate
f4861e2c3 - 2024-04-26 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-04-26 09:14:03 +02:00
dependabot[bot] 0081870305 [upd] pypi: Bump selenium from 4.19.0 to 4.20.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.19.0 to 4.20.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.19.0...selenium-4.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 09:10:46 +02:00
Markus Heiser ddaa6ed759 [fix] add missing localizable (gettext) messages to searxng.msg
To test this patch I used .. and checked the diff of the `messages.pot` file::

    $ ./manage pyenv.cmd pybabel extract -F babel.cfg \
              -o ./searx/translations/messages.pot searx/
    $ git diff ./searx/translations/messages.pot

----

hint from @dalf: f-string are not supported [1] but there is no error [2].

[1] python-babel/babel#594
[2] python-babel/babel#715

Closes: https://github.com/searxng/searxng/issues/3412
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:34:32 +02:00
Bnyro 0a4280a137 [refactor] translation engines: add translate category
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:33:28 +02:00
Bnyro 91522f3801 [feat] engine: implementation of LibreTranslate
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-26 07:33:28 +02:00
Grant Lanham Jr e0214412f8 Update .gitignore to ignore .python-version 2024-04-24 16:01:50 +02:00
searxng-bot af3be2b12b [l10n] update translations from Weblate
b58f11366 - 2024-04-17 - Right202209 <Right202209@users.noreply.translate.codeberg.org>
43b601950 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
5cac16eaf - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
88b5396d5 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
515161ddc - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
7f8e70b10 - 2024-04-17 - return42 <return42@users.noreply.translate.codeberg.org>
247777e50 - 2024-04-10 - Right202209 <Right202209@users.noreply.translate.codeberg.org>
1b0c91d0f - 2024-04-07 - shadow3x3x3 <shadow3x3x3@users.noreply.translate.codeberg.org>
f7f160fd0 - 2024-04-06 - vducong <vducong@users.noreply.translate.codeberg.org>
62cc9ce67 - 2024-04-06 - mrintegrity <mrintegrity@users.noreply.translate.codeberg.org>
131bec469 - 2024-04-06 - omfj <omfj@users.noreply.translate.codeberg.org>
bceb0dbec - 2024-04-06 - Uzakmo <Uzakmo@users.noreply.translate.codeberg.org>
51330ae18 - 2024-04-05 - tegcope <tegcope@users.noreply.translate.codeberg.org>
79a2eb668 - 2024-04-05 - sserra <sserra@users.noreply.translate.codeberg.org>
b3c2827e5 - 2024-04-05 - sserra <sserra@users.noreply.translate.codeberg.org>
ba46f8672 - 2024-04-03 - meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
b58a3eff1 - 2024-04-04 - return42 <return42@users.noreply.translate.codeberg.org>
3a9c022ea - 2024-04-03 - meskobalazs <meskobalazs@users.noreply.translate.codeberg.org>
424ea8188 - 2024-04-03 - Kita Ikuyo <searinminecraft@courvix.com>
2024-04-21 11:16:40 +02:00
Bnyro 644ae51417 [fix] yahoo: result titles are getting mixed together 2024-04-20 17:00:17 +02:00
dependabot[bot] 0f70e4d305 [upd] pypi: Bump sphinx-issues from 4.0.0 to 4.1.0
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 4.0.0 to 4.1.0.
- [Commits](https://github.com/sloria/sphinx-issues/compare/4.0.0...4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 10:43:53 +02:00
mrpaulblack 5e4ab964b7 [feat] template: add apple-touch-icon in html header
* this makes it possible to add SearXNG to iOS devices homescreen with a proper icon
2024-04-18 12:34:17 +02:00
singletail 1746eecf2b [fix] engine: youtube_api - ignore channels / prevent exceptions
`youtube_api.py` throws an exception if the search results contain a channel, as
channels have no videoId.  This PR adds a keycheck for parsing the json response.
2024-04-13 08:41:00 +02:00
Austin-Olacsi c92846dca8 [fix] dead URL in settings.yml 2024-04-13 07:03:45 +02:00
dependabot[bot] c8dca20548 [upd] npm: Bump eslint in /searx/static/themes/simple
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 18:11:42 +02:00
dependabot[bot] 9631e213fe [upd] pypi: Bump flask from 3.0.2 to 3.0.3
Bumps [flask](https://github.com/pallets/flask) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 17:32:40 +02:00
dependabot[bot] bbd2a4350a [upd] pypi: Bump lxml from 5.1.0 to 5.2.1
Bumps [lxml](https://github.com/lxml/lxml) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.1.0...lxml-5.2.1)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 17:31:38 +02:00
Diagonalo 6458490271 [mod] engine 'mwmbl: Update API URL 2024-04-10 06:51:28 +02:00
Markus Heiser f1a148f53e [fix] ddg engine: if no vqd value can be determined, don't save None
Closes: https://github.com/searxng/searxng/issues/3370
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 10:56:11 +02:00
Markus Heiser bd6ff29f8f [fix] remove usage of no longer existing names from lxml
In lxml 5.1.1 the private name `_ElementStringResult` in module `lxml.etree`
does no longer exists.

This code was written nearly a decade ago, its no longer clear what the
intention `_ElementStringResult` and `_ElementUnicodeResult` had been. It can be
assumed that these classes will no longer occur.

Closes: https://github.com/searxng/searxng/issues/3368
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 10:55:23 +02:00
Markus Heiser 26a92c1a8d [fix] new builds of icons.html do miss class="ionicon"
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 09:38:18 +02:00
Markus Heiser dddd628f48 [build] /static 2024-04-08 09:07:45 +02:00
Yaksh Bariya 9f5268b4a7 [enh] add keybindings for copying URLs
'y': for in Vim-mode (yank)
'c': for SearXNG-mode (copy)

This should help keyboard heavy users
2024-04-08 09:07:45 +02:00
Yaksh Bariya 8bf2da9ce5 [enh] add editorconfig rules for javascript files
SearXNG has a bunch of javascript files which have an indentation of
two, but the '*' rule tells my editor to use 4 spaces.
2024-04-08 09:07:45 +02:00
Markus Heiser 4acb52f68f [fix] even if limiter not activated, botdetection must be activated
Closes: #2975
Closes: #2995

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08 07:53:04 +02:00
Austin-Olacsi b6fe2cad71 [mod] Ask engine: remove tracking paramaters and set max page to 5 2024-04-08 07:50:14 +02:00
Bnyro bf3845b093 [feat] engine: implementation of Open Meteo 2024-04-07 19:02:53 +02:00
Markus Heiser f5bb64cca8 [fix] .dir-locals.el -> .dir-locals-template.el
The settungs in the .dir-locals.el do not work well for every emacs setup:

Add .dir-locals.el to the git-ignore list and move content to a template file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-29 08:57:02 +01:00
return42 ad9537065a [data] update searx.data - update_firefox_version.py 2024-03-29 08:44:18 +01:00
return42 531942ed16 [data] update searx.data - update_ahmia_blacklist.py 2024-03-29 08:43:50 +01:00
dependabot[bot] e8ee27e43c [upd] pypi: Bump selenium from 4.18.1 to 4.19.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.18.1 to 4.19.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.18.1...selenium-4.19.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 08:43:24 +01:00
return42 433cfd868a [data] update searx.data - update_currencies.py 2024-03-29 08:42:16 +01:00
return42 22d68aa2a7 [data] update searx.data - update_engine_traits.py 2024-03-29 08:41:44 +01:00
return42 cc124b8f14 [data] update searx.data - update_engine_descriptions.py 2024-03-29 08:41:00 +01:00
searxng-bot 550ca55778 [l10n] update translations from Weblate
cd974f62f - 2024-03-27 - matheuspolachini <matheuspolachini@users.noreply.translate.codeberg.org>
98335c289 - 2024-03-27 - pixrobot <pixrobot@users.noreply.translate.codeberg.org>
986969118 - 2024-03-25 - pixrobot <pixrobot@users.noreply.translate.codeberg.org>
285674006 - 2024-03-24 - Yahya-Lando <Yahya-Lando@users.noreply.translate.codeberg.org>
2024-03-29 08:23:44 +01:00
Mikkel Denker b21aaa8907 Add user-agent to stract requests 2024-03-22 13:40:46 +01:00
searxng-bot 32bd55e268 [l10n] update translations from Weblate
522463f6a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
8ec374759 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
ac6b5dff0 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
66b28f3e4 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
a8e6cb73b - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
cd153923a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
06110caf7 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
6bc307e8a - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
eef184a70 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
e5d537357 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
d592adfb0 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
0645b3404 - 2024-03-21 - return42 <return42@users.noreply.translate.codeberg.org>
da95a5907 - 2024-03-18 - jianhanquwan <jianhanquwan@users.noreply.translate.codeberg.org>
122a67a1f - 2024-03-17 - Oğuz Ersen <ersen@users.noreply.translate.codeberg.org>
39a7e1553 - 2024-03-15 - MonsoonRain <MonsoonRain@users.noreply.translate.codeberg.org>
2024-03-22 08:15:19 +01:00
dependabot[bot] bec34cf690 Bump black from 24.2.0 to 24.3.0
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.2.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 07:37:23 +01:00
dependabot[bot] e2af3e4970 [upd] pypi: Bump redis from 5.0.2 to 5.0.3
Bumps [redis](https://github.com/redis/redis-py) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.2...v5.0.3)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 09:59:21 +01:00
searxng-bot f78cf94507 [l10n] update translations from Weblate
5ab8a4123 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
8fdac20fd - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
f904a2b41 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
da78b59cb - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
c3ee00845 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
a1a4001e9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
b8ddc37d9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
257c6e52b - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
de6899977 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
06f9a81ee - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
0b916dcc0 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
2f78ef012 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
098a44813 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1bcbfb4b9 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1c561b9ca - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
44ab09c8b - 2024-03-12 - GeoffreyGx <GeoffreyGx@users.noreply.translate.codeberg.org>
5b767a16c - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
8dec572be - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
28e8c648d - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
77ce67845 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
1d044f989 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
a10834f13 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
eaa1cdd6e - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
b49e3879a - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
f55b61fb7 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
4954e6e49 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
33b08dc66 - 2024-03-12 - return42 <return42@users.noreply.translate.codeberg.org>
58df517d4 - 2024-03-11 - GeoffreyGx <GeoffreyGx@users.noreply.translate.codeberg.org>
cee7ec3f0 - 2024-03-10 - alexgabi <alexgabi@disroot.org>
2024-03-15 09:49:09 +01:00
Markus Heiser 74f6dfb576 [fix] .pylintrc mode signature to conf-unix
In pylint and python's config parser [1] the default symbol for comments is '#'.
The dialect is based on unix, while the classic dialect comes from windows and
uses a semicolon for comments.

[1] https://docs.python.org/3/library/configparser.html#module-configparser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-14 14:18:26 +01:00
Markus Heiser 542f7d0d7b [mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION
In the past, some files were tested with the standard profile, others with a
profile in which most of the messages were switched off ... some files were not
checked at all.

- ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished
- the distinction ``# lint: pylint`` is no longer necessary
- the pylint tasks have been reduced from three to two

  1. ./searx/engines -> lint engines with additional builtins
  2. ./searx ./searxng_extra ./tests -> lint all other python files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
Markus Heiser 8205f170ff [mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTION
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11 14:55:38 +01:00
Markus Heiser 707d6270c8 [doc] engine: mullvad leta
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 18:20:07 +01:00
Grant Lanham 9d6896a771 [feat] engine: implementation of mullvad leta 2024-03-10 18:20:07 +01:00
Markus Heiser 3edaa26dae [data] make data.all
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 15:56:50 +01:00
Markus Heiser ce4aaf6cad [mod] comprehensive revision of the searxng_extra/update/ scripts
- pylint all scripts
- fix some errors reported by pyright
- from searx.data import data_dir (Path.open)
- fix import from pygments.formatters.html

NOTE: none functional changes!

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 15:56:50 +01:00
Markus Heiser 0ffec440b2 [doc] annas_archive: ctegs journal_article & book_any has been removed
In commit 8af181533 in PR:

- https://github.com/searxng/searxng/pull/3321

the category `journal_article` has been removed, `book_any` has been removed
longer time ago.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 12:46:00 +01:00
return42 33b4ffee29 [data] update searx.data - update_engine_traits.py 2024-03-10 12:46:00 +01:00
return42 a5d36211a3 [data] update searx.data - update_ahmia_blacklist.py 2024-03-10 12:45:15 +01:00
return42 2cb389e9ce [data] update searx.data - update_currencies.py 2024-03-10 12:44:44 +01:00
return42 4a8867e646 [data] update searx.data - update_engine_descriptions.py 2024-03-10 12:01:33 +01:00
return42 7bbcf1be9a [data] update searx.data - update_external_bangs.py 2024-03-10 12:01:00 +01:00
Markus Heiser cff0097289 [fix] update_external_bangs: BANGS_URL 'https://duckduckgo.com/bang.js'
JSON file which contains the bangs / there is no longer a versioning of this
file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 11:58:20 +01:00
Markus Heiser e97e1f9110 [fix] duckduckgo.fetch_traist - URL of region definitions has changed
- https://duckduckgo.com/dist/util/u.7669f071a13a7daa57cb.js

updated from u661.js to u.7669f071a13a7daa57cb / should be updated
automatically?  The last change was on March 23rd in dba8977b09 [1]

- [1] https://github.com/searxng/searxng/pull/2269

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-10 10:32:54 +01:00
Markus Heiser 33c099022b [drop] engine framalibre - sarch URL is no longer supported
Closes: https://github.com/searxng/searxng/issues/3286
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 18:00:45 +01:00
Markus Heiser 691390b443 [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:56:12 +01:00
Markus Heiser a48da9b28a [fix] CI YAML config files
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 14:08:00 +01:00
Markus Heiser 18028f3c13 [mod] CI: tag commits with leading scope/type of the modification
Add a leading tag (in square brackets) about the scope/type to commit messages
from automated tasks (commits from CI).

dependantbot::

    [upd] pypi: Bump .. from .. to ..
    [upd] npm: Bump .. from .. to .. in /searx/static/themes/simple

Weblate translation updates::

    [l10n] update translations from Weblate

updates of ./data::

    [data] update searx.data ...

build commit of gh-pages::

    [doc] build from commit ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 12:17:23 +01:00
Alexandre Flament 42515d98f7 engine npm use the packages.html template 2024-03-09 10:24:49 +01:00
Bnyro 6dd07b88a4 [feat] lib.rs: use packages.html template 2024-03-09 10:17:16 +01:00
Markus Heiser 50d5a9ff60 [fix] issues reported by pylint 3.1.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 09:28:13 +01:00
dependabot[bot] 3bea2e7e3a Bump pylint from 3.0.3 to 3.1.0
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.3...v3.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-09 09:28:13 +01:00
Markus Heiser a7b51f023e [black] upgrade black 22.12.0 --> 24.2.0
The issue discussed in [1] has been solved since [2] has been merged into black
/ now we can upgrade without touching 69 files as it was needed with black
23.1.0 [3].

[1] https://github.com/searxng/searxng/pull/2159#issuecomment-1425723977
[2] https://github.com/psf/black/pull/4060
[3] https://github.com/searxng/searxng/pull/2159/files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-09 08:15:50 +01:00
dependabot[bot] 48d04871a4 Bump python-dateutil from 2.8.2 to 2.9.0.post0
Bumps [python-dateutil](https://github.com/dateutil/dateutil) from 2.8.2 to 2.9.0.post0.
- [Release notes](https://github.com/dateutil/dateutil/releases)
- [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS)
- [Commits](https://github.com/dateutil/dateutil/compare/2.8.2...2.9.0.post0)

---
updated-dependencies:
- dependency-name: python-dateutil
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 18:46:18 +01:00
Bnyro 44decaa524 [feat] pkg.go.dev: use packages.html template 2024-03-08 17:18:54 +01:00
centralscrutinizer21 fbea0dd3ce [l10n] Italian translation of infopages 2024-03-08 17:18:29 +01:00
searxng-bot 9c08a0cddd [translations] update from Weblate
184c000d8 - 2024-03-07 - 0ko <0ko@users.noreply.translate.codeberg.org>
7a107e46c - 2024-03-04 - Bubowny <outcheesed@proton.me>
f02911c4b - 2024-03-04 - tentsbet <remendne@pentrens.jp>
e4e8977cc - 2024-03-02 - marcelStangenberger <codeberg@xo.nl>
4a9923cee - 2024-03-02 - Integral <integral@member.fsf.org>
05e7bb2f8 - 2024-03-01 - return42 <markus.heiser@darmarit.de>
4b466efdc - 2024-03-01 - syobon <syobon@syobon.net>
2024-03-08 08:21:21 +01:00
Markus Heiser fba8371396 [fix] XPath engine hoogle - hoogle.haskell.org has no paging support
Search on hoogle.haskell.org does no longer have pages.

Closes: https://github.com/searxng/searxng/issues/3278
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-07 17:31:25 +01:00
Markus Heiser a5b81e2555 [fix] nyaa engine - paging support & filesize (GiB)
BTW: pylint engine

Closes: https://github.com/searxng/searxng/issues/3290
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-07 07:38:31 +01:00
Markus Heiser 3179993847 [fix] XPath engine lobste.rs - argument utf8 is no longer needed
Closes: https://github.com/searxng/searxng/issues/3279
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 13:24:50 +01:00
Markus Heiser 3529f0af50 [fix] engine searchcode.com - paging is broken in searchcode.com's API
paging is broken in searchcode.com's API .. not sure it will ever been fixed /
this commit disables paging in the engine and BTW pylint `searchcode_code.py`.

Closes: https://github.com/searxng/searxng/issues/3287
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 12:33:29 +01:00
Markus Heiser 76b18545e4 [fix] XPath engine naver - content selector needed an update
Closes: https://github.com/searxng/searxng/issues/3282
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 11:11:31 +01:00
Markus Heiser 5602f0bf96 [fix] engine pinterest - ignore result type 'story'
Close: https://github.com/searxng/searxng/issues/3289
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-06 07:33:43 +01:00
Markus Heiser d97b84bea2 [fix] ddg engines (get_vqd) - the vqd value is no longer in the form
Closes: https://github.com/searxng/searxng/issues/3276
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-05 16:27:04 +01:00
Alexandre Flament b7be53bb90 Docker: use Alpine 3.19 2024-03-04 19:40:57 +01:00
Alexandre Flament 0e2566db68 internetarchivescholar engine: set timeout to 15 seconds 2024-03-03 20:16:32 +01:00
Alexandre Flament 7c5c11949b Checker: tests for wikispecies 2024-03-03 20:00:46 +01:00
Alexandre Flament 8fed5798ab Checker: tests for bahnhof 2024-03-03 20:00:46 +01:00
Yaksh Bariya b1431e1670 [feat] engine: implementation of cppreference 2024-03-03 17:07:29 +01:00
Alexandre Flament 1a66bfa66c checker: display results at the end 2024-03-03 11:18:43 +01:00
Alexandre Flament 08e7c37a35 GitHub workflows: run checker on Friday 2024-03-03 11:18:43 +01:00
Alexandre Flament b56449d3fa Fix make search.checker 2024-03-03 11:18:43 +01:00
Alexandre Flament 38fdd2288a
Drop typing-extensions dependency (#3265)
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-02 13:10:31 +01:00
searxng-bot 1892a87fd2 [translations] update from Weblate
663d8815b - 2024-03-01 - return42 <markus.heiser@darmarit.de>
f97823239 - 2024-02-28 - return42 <markus.heiser@darmarit.de>
480a0ec8d - 2024-02-28 - eownerdead <wlpx0yii@anonaddy.me>
905211981 - 2024-02-26 - gallegonovato <fran-carro@hotmail.es>
10e90be9a - 2024-02-25 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
3b803ba23 - 2024-02-26 - feather1 <verdimario2015@gmail.com>
8bbaaa43e - 2024-02-25 - return42 <markus.heiser@darmarit.de>
6950cdb97 - 2024-02-26 - Linerly <linerly@protonmail.com>
807c9891d - 2024-02-26 - ghose <correo@xmgz.eu>
e16ca50cd - 2024-02-25 - return42 <markus.heiser@darmarit.de>
85241d9ce - 2024-02-25 - Fjuro <ifjuro@proton.me>
2024-03-02 09:37:52 +01:00
dependabot[bot] 858b2071df Bump redis from 5.0.1 to 5.0.2
Bumps [redis](https://github.com/redis/redis-py) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v5.0.1...v5.0.2)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 08:13:44 +01:00
dependabot[bot] dd2379b96f Bump wlc from 1.13 to 1.14
Bumps [wlc](https://github.com/WeblateOrg/wlc) from 1.13 to 1.14.
- [Changelog](https://github.com/WeblateOrg/wlc/blob/main/CHANGES.rst)
- [Commits](https://github.com/WeblateOrg/wlc/compare/1.13...1.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 08:11:51 +01:00
Bnyro f3b4bf86a7 [feat] engine: implementation of void linux packages
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-29 13:12:40 +01:00
Alexandre Flament d58760ef75 [mod] pypi engine: use packages.html 2024-02-29 07:48:44 +01:00
dalf 35873b5a1c Update searx.data - update_ahmia_blacklist.py 2024-02-29 07:47:54 +01:00
dalf df74b5b59b Update searx.data - update_firefox_version.py 2024-02-29 07:47:01 +01:00
dalf 473b2dd42f Update searx.data - update_wikidata_units.py 2024-02-29 07:46:27 +01:00
dalf 9a474715e8 Update searx.data - update_engine_descriptions.py 2024-02-29 07:46:02 +01:00
Markus Heiser c0b97c6543 [fix] re-add opensearch_url / its used in based.html
The URL was accidentally deleted in a85907a98, but is still required in
base.html for auto-discovery / from base.html::

  <link title="{{ instance_name }}"
        type="application/opensearchdescription+xml"
	rel="search" href="{{ opensearch_url }}"
	/>

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 18:26:16 +01:00
templehasfallen e8bd6c03bf Update settings.yml
Changed value of "extra_proxy_timeout" from 10.0 to 10 as the variable expects an int.
Uncommenting this value with a non-int value will throw many errors and crash all engines.
2024-02-25 16:35:13 +01:00
Austin-Olacsi 9330a072eb [feat] engine: implementation of pixiv 2024-02-25 16:29:57 +01:00
Bnyro cf57914359 [build] /static 2024-02-25 16:22:37 +01:00
Bnyro db1f9b31c9 [feat] images: show resolution inside the image and fix image details overflow
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Bnyro e76ab1a4b3 [refactor] images: add resolution, image format and filesize fields
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 16:22:37 +01:00
Markus Heiser b683aa63fb [feat] github: use packages template
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 14:56:57 +01:00
Bnyro 1d6f475fbc [feat] dockerhub: use packages template 2024-02-25 14:56:57 +01:00
Bnyro 60d8414ef1 [docs] engine_overview: add packages result template 2024-02-25 14:56:57 +01:00
Markus Heiser 34fa2b7cca [build] /static 2024-02-25 14:56:57 +01:00
Bnyro 938391b050 [feat] templates: add package result template
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 14:56:57 +01:00
Markus Heiser a85907a98f [fix] opensearxh.xml: firefox v123 does not except self-URI (URL with param)
Before this patch we had a address in the rel-self-template with params [1]:

GET::

    <Url method="GET"
         rel="self"
         template="/opensearch.xml?method=GET&amp;autocomplete=google"
         type="application/opensearchdescription+xml"/>

POST::

    <Url method="POST"
         rel="self"
         template="/opensearch.xml?method=POST&amp;autocomplete=google"
         type="application/opensearchdescription+xml"/>

The first one (GET) is no longer accepted by firefox since v123, the latter one
was always been wrong (since it mixes GET params with a POST request).

Since Firefox v123 a template syntax [2] in the rel-self-template is no longer
supported / Firefox will report an error::

    Firefox could not download the search plugin from:
    http://127.0.0.1:8888//opensearch.xml?method=GET&autocomplete=google

This patch reduce the URL to::

    template="http://127.0.0.1:8888/opensearch.xml"

[1] https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#url-rel-values
[2] https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#opensearch-url-template-syntax

Closes: https://github.com/searxng/searxng/issues/3227
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-25 07:33:04 +01:00
Markus Heiser d72fa99bd0 [fix] setup.py - needed bugfixes to build a valid package
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-24 07:22:26 +01:00
dependabot[bot] c7309a0869 Bump selenium from 4.17.2 to 4.18.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.17.2 to 4.18.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.18.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 08:55:09 +01:00
dependabot[bot] 8a11e6ac55 Bump yamllint from 1.35.0 to 1.35.1
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.35.0 to 1.35.1.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.35.0...v1.35.1)

---
updated-dependencies:
- dependency-name: yamllint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 08:35:41 +01:00
searxng-bot 671333081c [translations] update from Weblate
946267db3 - 2024-02-23 - return42 <markus.heiser@darmarit.de>
2024-02-23 08:14:58 +01:00
Bnyro cfbe59b6b3 [feat] engine: implementation of mozhi 2024-02-23 07:50:48 +01:00
Xinos 3c42252c78 [feat] engine: implementation of yandex music
Access to music is limited to a few countries:

- https://yandex.com/support/music/access.html
2024-02-21 17:17:12 +01:00
KalokaK fb36a06acd [fix] utils/searxng.sh uses searx.shared module which no longer exists
Issue exists since #1954 has been merged / the PR fixed all searx.shared except
this one fixed here in this commit.

Related: https://github.com/searxng/searxng/pull/1954
Closes: https://github.com/searxng/searxng/issues/3224
2024-02-20 15:18:40 +01:00
micsthepick fde21c8f99 [feat] engine: Add LiveSpace livestreams 2024-02-20 14:45:07 +01:00
searxng-bot 3b80f9fe03 [translations] update from Weblate
df7653397 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
c62c03816 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
a48235060 - 2024-02-18 - tentsbet <remendne@pentrens.jp>
445545961 - 2024-02-19 - return42 <markus.heiser@darmarit.de>
275a77e51 - 2024-02-16 - hankskyjames777 <iamjuanz30312@gmail.com>
0772d9b4c - 2024-02-16 - Fjuro <ifjuro@proton.me>
2024-02-20 12:33:32 +01:00
Markus Heiser 894f164869 [fix] sort RTL_LOCALES before written into locales.json
To avoid unnecessary changes to the file, the list should be sorted before it is
written to the file.

You can test it by calling multiple times::

    make data.locales

and searx/data/locales.json should be unchanged.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20 12:29:13 +01:00
Alexandre Flament ed66ed758d [mod] reduce memory footprint by not calling babel.Locale.parse at runtime
babel.Locale.parse loads more than 60MB in RAM.  The only purpose is to get:

    LOCALE_NAMES   - searx.data.LOCALES["LOCALE_NAMES"]
    RTL_LOCALES    - searx.data.LOCALES["RTL_LOCALES"]

This commit calls babel.Locale.parse when the translations are update from
weblate and stored in::

    searx/data/locales.json

This file can be build by::

    ./manage data.locales

By store these variables in searx.data when the translations are updated we save
round about 65MB (usually 4 worker = 260MB of RAM saved.

Suggested-by: https://github.com/searxng/searxng/discussions/2633#discussioncomment-8490494
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-20 10:43:20 +01:00
Markus Heiser 76845ea42c [mod] engine ask.com - parse JS result to JSON
Parse the result list from ask.com given in the variable named
window.MESON.initialState::

    <script nonce="..">
        window.MESON = window.MESON || {};
        window.MESON.initialState = {"siteConfig": ...
          ...}};
        window.MESON.loadedLang = "en";
    </script>

The result list is in field::

    json_resp['search']['webResults']['results']

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-18 09:17:22 +01:00
Hackurei 3df53d6e50 [feat] engine: implementation of ask.com 2024-02-18 09:17:22 +01:00
Markus Heiser c197c0e35e [fix] remove twine from requirements-dev
SearXNG is a rolling release / we do not deploy packages on PyPi

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-16 18:29:40 +01:00
dependabot[bot] 08e524fc35 Bump yamllint from 1.34.0 to 1.35.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.34.0 to 1.35.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.34.0...v1.35.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 15:48:28 +01:00
searxng-bot 2aef3a556f [translations] update from Weblate
be989636e - 2024-02-14 - return42 <markus.heiser@darmarit.de>
0e3455cb8 - 2024-02-13 - return42 <markus.heiser@darmarit.de>
edc279680 - 2024-02-14 - pietro395 <me@pietro.in>
e0d3b7f9f - 2024-02-14 - kratos <makesocialfoss32@keemail.me>
f68fc5440 - 2024-02-13 - gallegonovato <fran-carro@hotmail.es>
980f3846c - 2024-02-12 - tentsbet <remendne@pentrens.jp>
711618f3a - 2024-02-12 - return42 <markus.heiser@darmarit.de>
1d12e762f - 2024-02-12 - ghose <correo@xmgz.eu>
ab319100b - 2024-02-12 - return42 <markus.heiser@darmarit.de>
9854a5a4a - 2024-02-12 - return42 <markus.heiser@darmarit.de>
ebfb23f13 - 2024-02-10 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-02-16 15:48:10 +01:00
Bnyro 11c0651ef4 [fix] lingva: redirect and parsing error 2024-02-11 11:28:47 +01:00
dalf bffc4905ce Update searx.data - update_currencies.py 2024-02-10 23:55:41 +01:00
Markus Heiser bfcd41f04a [clean] drop obsolete py3.7 compatibility
- https://github.com/searxng/searxng/discussions/2356

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 09:27:19 +01:00
Hackurei b0fe0924a3 [feat] engine: implementation of brave goggles 2024-02-10 08:09:50 +01:00
Markus Heiser 53898b8c37 [mod] footer: i18n for the link names in the footer
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 08:03:43 +01:00
Bnyro 7e1b5f6cc8 [feat] footer: support for custom entries 2024-02-10 08:03:43 +01:00
dependabot[bot] 596b9b7864 Bump certifi from 2023.11.17 to 2024.2.2
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.11.17 to 2024.2.2.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.11.17...2024.02.02)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:47:15 +01:00
dependabot[bot] bbe42ea81d Bump yamllint from 1.33.0 to 1.34.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.33.0 to 1.34.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.33.0...v1.34.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:41:03 +01:00
dependabot[bot] b7740e4922 Bump flask from 3.0.1 to 3.0.2
Bumps [flask](https://github.com/pallets/flask) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.1...3.0.2)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-10 07:39:58 +01:00
Markus Heiser a1c38d5965 Revert "[fix] remove certifi from requirements.txt [1]"
This reverts commit 36ae1c7034.
2024-02-10 07:32:41 +01:00
Markus Heiser 36ae1c7034 [fix] remove certifi from requirements.txt [1]
[1] https://github.com/searxng/searxng/commit/93f7f7eee2e8

forensics:

- Requirement certify was added in 35a2bc5650

- Since commit 93f7f7eee certifi is no longer needed.  Not sure why 93f7f7eee
  upgraded certifi while removing the usage of this package from the source code
  in the same commit.

Closes: https://github.com/searxng/searxng/pull/3182
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-10 07:17:56 +01:00
searxng-bot 459389a2da [translations] update from Weblate
2b940307e - 2024-02-08 - return42 <markus.heiser@darmarit.de>
e7cdce39e - 2024-02-08 - return42 <markus.heiser@darmarit.de>
171fae67d - 2024-02-08 - return42 <markus.heiser@darmarit.de>
d6a760466 - 2024-02-08 - return42 <markus.heiser@darmarit.de>
8cc4c51a9 - 2024-02-04 - return42 <markus.heiser@darmarit.de>
2e76559ba - 2024-02-04 - return42 <markus.heiser@darmarit.de>
2024-02-09 08:15:45 +01:00
Markus Heiser df1a774003 [fix] KeyError: 'title' in results using key-value.html template
Since #2508 a title is required --> this is a bug when an engine uses the
key-value.html template [1], where no title is needed.

[1] https://github.com/searxng/searxng/blob/master/searx/templates/simple/result_templates/key-value.html

Closes: https://github.com/searxng/searxng/issues/3130
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-06 07:53:39 +01:00
dependabot[bot] fcfff92017 Bump nose2[coverage_plugin] from 0.14.0 to 0.14.1
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.14.0 to 0.14.1.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.14.0...0.14.1)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-03 09:41:52 +01:00
searxng-bot 11f918296f [translations] update from Weblate
a00154946 - 2024-02-01 - yuttct <yuttct@yahoo.com>
9f220b2aa - 2024-02-02 - return42 <markus.heiser@darmarit.de>
71951ae12 - 2024-02-02 - return42 <markus.heiser@darmarit.de>
a2f344a70 - 2024-02-02 - return42 <markus.heiser@darmarit.de>
0f2944179 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
f0d42961f - 2024-02-01 - return42 <markus.heiser@darmarit.de>
a5cc1c6d5 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
c5a39252d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
fa01c9758 - 2024-02-01 - return42 <markus.heiser@darmarit.de>
51a86de3d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
4a55d6d8d - 2024-02-01 - return42 <markus.heiser@darmarit.de>
3bb8adf1f - 2024-02-01 - return42 <markus.heiser@darmarit.de>
1b2e23dcb - 2024-02-01 - return42 <markus.heiser@darmarit.de>
7589d6bbc - 2024-02-01 - return42 <markus.heiser@darmarit.de>
c04d8739c - 2024-01-31 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
2024-02-02 08:18:01 +01:00
Markus Heiser be0d756ad5 [fix] libgen.fun is down, switch to libgen.rs
Closes: https://github.com/searxng/searxng/issues/3178
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-02-01 20:32:10 +01:00
allixx 6d31ca28b5 [fix] remove missing link icon macro 2024-02-01 08:13:43 +01:00
Hermógenes Oliveira 100a150a33 Remove rtl exception
This right-to-left exception doesn't seem to be called for.
2024-01-31 20:03:10 +01:00
Hermógenes Oliveira f9f0c2ec03 Fix media exposure toggle
Make initially hidden and the toggle button consistent.
2024-01-31 20:03:10 +01:00
Hermógenes Oliveira fa7fef7d87 Provide template for results in file category
This is used, for instance, by the recoll engine.
2024-01-31 20:03:10 +01:00
Markus Heiser ab8e5383fb [mod] remove X-XSS-Protection headers
Deprecated header not used by browsers nowadays[1]:

"""In modern browsers, X-XSS-Protection has been deprecated in favor of the
Content-Security-Policy to disable the use of inline JavaScript. Its use can
introduce XSS vulnerabilities in otherwise safe websites. This should not be
used unless you need to support older web browsers that don’t yet support CSP.
It is thus recommended to set the header as X-XSS-Protection: 0."""[2]

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
[2] https://infosec.mozilla.org/guidelines/web_security#x-xss-protection

Closes: https://github.com/searxng/searxng/issues/3171
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-31 17:23:41 +01:00
allixx dca78f920f [build] /static 2024-01-31 17:22:03 +01:00
allixx c85f706601 [fix] wrong engines padding 2024-01-31 17:22:03 +01:00
allixx 30dcaf1db6 [fix] equalize cached/proxied links left margin 2024-01-31 17:22:03 +01:00
allixx 1e03094dee [fix] justify engines/cached/proxied vertically 2024-01-31 17:22:03 +01:00
Markus Heiser c14b117121 [fix] brave.search - update result selectors to fit to new layout
Closes: https://github.com/searxng/searxng/issues/3167
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-31 16:21:56 +01:00
Bnyro efbee96b1d [feat] brave: fix empty content and parse published dates 2024-01-30 07:41:45 +01:00
Bnyro 90072eb6ff [build] /static 2024-01-29 18:09:22 +01:00
Bnyro a5decfb838 [feat] preferences: button to copy input to restore preferences hash 2024-01-29 18:09:22 +01:00
Markus Heiser a8aaf5719b [test.robot] update gecko driver / v0.34.0 required by firefox 121.*
Update gecko driver to v0.34.0 [1]

[1] https://github.com/mozilla/geckodriver/releases/tag/v0.34.0

Closes: https://github.com/searxng/searxng/issues/3141
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-29 17:37:30 +01:00
Bnyro 559b860618 [feat] engine: implementation of goodreads 2024-01-29 16:07:24 +01:00
dependabot[bot] c2f1e760a1 Bump selenium from 4.16.0 to 4.17.2
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.16.0 to 4.17.2.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:33:35 +01:00
dependabot[bot] b3691c6421 Bump flask from 3.0.0 to 3.0.1
Bumps [flask](https://github.com/pallets/flask) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:32:10 +01:00
dependabot[bot] 6d819c2879 Bump typing-extensions from 4.8.0 to 4.9.0
Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.8.0 to 4.9.0.
- [Release notes](https://github.com/python/typing_extensions/releases)
- [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/python/typing_extensions/compare/4.8.0...4.9.0)

---
updated-dependencies:
- dependency-name: typing-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:25:39 +01:00
searxng-bot a962aab9b0 [translations] update from Weblate
c1a3532a2 - 2024-01-23 - return42 <markus.heiser@darmarit.de>
603c6894b - 2024-01-23 - return42 <markus.heiser@darmarit.de>
2920c7342 - 2024-01-22 - Eshan-K-I <2027eiyer@tjhsst.edu>
64cc1168a - 2024-01-20 - return42 <markus.heiser@darmarit.de>
21ec41823 - 2024-01-20 - return42 <markus.heiser@darmarit.de>
2024-01-29 15:01:37 +01:00
dependabot[bot] 7f025a421b Bump sphinx-tabs from 3.4.4 to 3.4.5
Bumps [sphinx-tabs](https://github.com/executablebooks/sphinx-tabs) from 3.4.4 to 3.4.5.
- [Release notes](https://github.com/executablebooks/sphinx-tabs/releases)
- [Changelog](https://github.com/executablebooks/sphinx-tabs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-tabs/compare/v3.4.4...v3.4.5)

---
updated-dependencies:
- dependency-name: sphinx-tabs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 15:00:06 +01:00
dependabot[bot] 74e28a570a Bump sphinx-issues from 3.0.1 to 4.0.0
Bumps [sphinx-issues](https://github.com/sloria/sphinx-issues) from 3.0.1 to 4.0.0.
- [Commits](https://github.com/sloria/sphinx-issues/compare/3.0.1...4.0.0)

---
updated-dependencies:
- dependency-name: sphinx-issues
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 14:51:43 +01:00
dalf 62fa85287a Update searx.data - update_wikidata_units.py 2024-01-29 14:04:24 +01:00
dalf 0ed7548d83 Update searx.data - update_firefox_version.py 2024-01-29 14:04:03 +01:00
dalf d763934a7a Update searx.data - update_ahmia_blacklist.py 2024-01-29 14:03:03 +01:00
dalf 14f73ef3d9 Update searx.data - update_engine_traits.py 2024-01-29 14:02:30 +01:00
dalf a393341403 Update searx.data - update_engine_descriptions.py 2024-01-29 13:34:12 +01:00
allixx e4cf0a7d4f [fix] do highlight replacement at once
Highlights all search queries in search result in one go.

Fixes the case where search query contains word from highlight HTML code,
which causes broken HTML to appear in search results.

Closes #3057
2024-01-29 13:15:37 +01:00
Bnyro 8c73aa772b [fix] semantic scholar: bad request 2024-01-25 06:12:08 +01:00
dependabot[bot] 047c7a7cf6 Bump splinter from 0.20.1 to 0.21.0
Bumps [splinter](https://github.com/cobrateam/splinter) from 0.20.1 to 0.21.0.
- [Release notes](https://github.com/cobrateam/splinter/releases)
- [Changelog](https://github.com/cobrateam/splinter/blob/master/docs/news.rst)
- [Commits](https://github.com/cobrateam/splinter/compare/0.20.1...0.21.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 12:11:10 +01:00
searxng-bot ab5d2f32bb [translations] update from Weblate
0f8246b81 - 2024-01-17 - return42 <markus.heiser@darmarit.de>
ce23e8ce9 - 2024-01-16 - return42 <markus.heiser@darmarit.de>
1112731cb - 2024-01-17 - return42 <markus.heiser@darmarit.de>
2024-01-19 08:29:29 +01:00
Émilien (perso) 7c80807bb8
Block HeadlessChrome (#3116) 2024-01-17 09:14:36 +01:00
Jinyuan Huang 9c5f9735cf [fix] engine: safesearch parameter in Google Videos engine (#2762)
Closes: https://github.com/searxng/searxng/issues/2762
2024-01-16 15:29:09 +01:00
Markus Heiser 8762863ebf [mod] presearch: set WEB timeout to 4sec & single network for all request
timeout: 4.0
  The timeout of presearch-WEB is left up from the default of 3sec to 4sec.  The
  engine has to send two HTTP requests, they often exceed the default timeout of
  3sec. Since all other presearch categories (images, videos, news) also have a
  timeout of 4 sec, the WEB search should also have the same timeout.

network: presearch
  Place all HTTP requests in the same network, named ``presearch``.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Markus Heiser e560d7e373 [mod] presearch: add language & region support
In Presearch there are languages for the UI and regions for narrowing down the
search.  With this change the SearXNG engine supports a search by region.  The
details can be found in the documentation of the source code.

To test, you can search terms like::

   !presearch bmw :zh-TW
   !presearch bmw :en-CA

1. You should get results corresponding to the region (Taiwan, Canada)
2. and in the language (Chinese, Englisch).
3. The context in info box content is in the same language.

Exceptions:

1. Region or language is not supported by Presearch or
2. SearXNG user did not selected a region tag, example::

    !presearch bmw :en

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Markus Heiser a2c269bbac [mod] presearch: hardening engine's response against KeyErrors
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 19:23:26 +01:00
Bnyro 0a78f59aba [fix] presearch: safesearch, time ranges, crash when no result found 2024-01-15 19:23:26 +01:00
Markus Heiser 87f18b98ec [fix] SyntaxWarning: invalid escape sequence '\>'
This patch fixes issue reported by ``make test.unit``::

   searx/search/checker/impl.py:39: SyntaxWarning: invalid escape sequence '\>'
      rep = ['<' + tag + '[^\>]*>' for tag in HTML_TAGS]

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-15 18:27:21 +01:00
searxng-bot b0b2efdc8d [translations] update from Weblate
3dafa37f3 - 2024-01-10 - return42 <markus.heiser@darmarit.de>
a641db83f - 2024-01-10 - Rick1029 <yoshibear1029@gmail.com>
a3d2b083f - 2024-01-08 - johnmartzbuntia <johnmartibuntia@jmtb.xyz>
b6dec1f75 - 2024-01-08 - return42 <markus.heiser@darmarit.de>
eb76d8b8d - 2024-01-09 - Rick1029 <yoshibear1029@gmail.com>
2024-01-13 09:33:41 +01:00
dependabot[bot] a19028bd90 Bump lxml from 5.0.0 to 5.1.0
Bumps [lxml](https://github.com/lxml/lxml) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.0.0...lxml-5.1.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 10:28:26 +01:00
dependabot[bot] 065e95cd05 Bump jinja2 from 3.1.2 to 3.1.3
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 09:29:59 +01:00
Markus Heiser 54a6626582 [fix] issues reported by shellcheck v0.9.0
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-09 16:31:19 +01:00
Markus Heiser f9c5727ddc [mod] get rid of ./utils/brand.env and its workflow
All the environments defined in ./utils/brand.env are generated on the fly, so
there is no longer a need to define the brand environment in this file and all
the workflows to handle this file.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-01-09 16:31:19 +01:00
Alexandre Flament 60bc5baea3 [mod] ./utils/get_setting.py tiny YAML parser for settings.yml
This allow to read settings on the fly even without virtualenv.  The ultimate
goal of the commit is to remove utils/brand.env from the git repository.

The code includes a tiny yaml parser that **should** be good enough.  The code
read searx/settings.yml directly (and ignore the environment variables).

yq [1] is a more reliable alternative but this require to download a binary from
github which is not great.

[1] https://github.com/mikefarah/yq/#install
2024-01-09 16:31:19 +01:00
Bnyro 3dea7e609b [feat] autocompleter: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
Bnyro 621e1313af [feat] engine: implementation of stract (beta) 2024-01-07 11:18:16 +01:00
dependabot[bot] 2f7c800f6f Bump lxml from 4.9.4 to 5.0.0
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.4 to 5.0.0.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.4...lxml-5.0.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:26:05 +01:00
Myzel394 55568051d4 fix(docs): Fix development quickstart url 2024-01-06 16:20:38 +01:00
searxng-bot c90dc201fc [translations] update from Weblate
a04e3b59c - 2024-01-02 - return42 <markus.heiser@darmarit.de>
a4d387847 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
80521c1b3 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
e90952815 - 2024-01-02 - return42 <markus.heiser@darmarit.de>
2debd5992 - 2023-12-29 - alextecplayz <alextec70@outlook.com>
c4d54c3e5 - 2023-12-29 - alexgabi <alexgabi@disroot.org>
1a0c9c025 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
dc99d1390 - 2023-12-29 - ETRB <codeberg-cm58mk@r.acmrb.uk>
477e01149 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
65dacdd30 - 2023-12-29 - staram <gritty.year0043@fastmail.com>
6a20c8853 - 2023-12-29 - SecularSteve <fairfull.playing@gmail.com>
2024-01-06 16:20:13 +01:00
Émilien (perso) 3535377c9a Searx to SearXNG change error message 2023-12-31 16:19:14 +01:00
searxng-bot 27e26b3d65 [translations] update from Weblate
966bbd849 - 2023-12-29 - staram <gritty.year0043@fastmail.com>
d4680cb39 - 2023-12-29 - 1024mb <aberetta@protonmail.com>
b2cf5fbaf - 2023-12-27 - Linuks <linuks@skiff.com>
fa8654087 - 2023-12-27 - tentsbet <remendne@pentrens.jp>
fc759fe0b - 2023-12-27 - Linerly <linerly@protonmail.com>
cf9b03bfd - 2023-12-27 - return42 <markus.heiser@darmarit.de>
03bd73400 - 2023-12-27 - Linerly <linerly@protonmail.com>
88ffa01ec - 2023-12-27 - return42 <markus.heiser@darmarit.de>
736c44d3f - 2023-12-25 - err_connection_closed <err_connection_closed@users.noreply.translate.codeberg.org>
dd3a15279 - 2023-12-26 - ghose <correo@xmgz.eu>
fd68404ee - 2023-12-26 - return42 <markus.heiser@darmarit.de>
941e60232 - 2023-12-23 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
41dfd42d7 - 2023-12-23 - mittwerk <w0o0y8jt@duck.com>
1ca048b0b - 2023-12-23 - Fjuro <ifjuro@proton.me>
2023-12-29 08:48:24 +01:00
dalf 4647981419 Update searx.data - update_wikidata_units.py 2023-12-29 06:09:04 +01:00
dalf a8cc101c35 Update searx.data - update_ahmia_blacklist.py 2023-12-29 06:08:35 +01:00
dalf 59a67f30c8 Update searx.data - update_firefox_version.py 2023-12-29 06:07:46 +01:00
dalf 81e8638de0 Update searx.data - update_currencies.py 2023-12-29 06:06:51 +01:00
Markus Heiser d676ae8ab3 [build] /static 2023-12-28 19:15:04 +01:00
Jinyuan Huang f6d797ef43 [fix] fix a display problem in the image detail preview. 2023-12-28 19:15:04 +01:00
Markus Heiser 0d47322ac8 [build] /static 2023-12-28 18:59:14 +01:00
ahmad-alkadri 07e846e91a Prevent default browser behavior on click event 2023-12-28 18:59:14 +01:00
Markus Heiser 8dfc1dbc5c [fix] engine - offical URL moved to https://lingva.thedaviddelta.com/
The ML top-level domain has been removed from Freenom ... moved the official
instance to https://lingva.thedaviddelta.com  [1]

To test use translation syntax:

    !lv en-de Alternative front-end for Google Translate

[1] https://fosstodon.org/@thedaviddelta/111376540936289966

Closes: https://github.com/searxng/searxng/issues/2718
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-25 09:57:35 +01:00
Markus Heiser 2863b0f6da Update searx.data - update_engine_traits.py
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-24 08:28:32 +01:00
Markus Heiser 6df922b9da [fix] fetch_traits of google and zlibrary
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-24 08:28:32 +01:00
Bnyro d6ac2b5a55 [feat] engine: implementation of bahnhof.de 2023-12-23 17:38:38 +01:00
Markus Heiser 6129b16165 [mod] simplify no results on pages > 1 to "There are no more results."
BTW: remove not needed whitespaces in the generated HTML

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-23 09:50:39 +01:00
obfuscated-loop 2179a418c4 [mod] Change no results error message based on page number 2023-12-23 09:50:39 +01:00
Jay b4de72a96f [mod] Capitalize theme names/styles in theme.html view file 2023-12-23 09:07:08 +01:00
Markus Heiser 91737f719a [mod] nodejs v16 reaached EOL / upgrade to v20.10
[1] https://nodejs.org/en/about/previous-releases

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-23 07:49:03 +01:00
dependabot[bot] 26737fda1b Bump sharp from 0.32.6 to 0.33.0 in /searx/static/themes/simple
Bumps [sharp](https://github.com/lovell/sharp) from 0.32.6 to 0.33.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.32.6...v0.33.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:49:03 +01:00
Markus Heiser 3665b32aff Revert "[fix] update user agent"
This reverts commit 3c6549a17f.

Related:

- https://github.com/searxng/searxng/pull/2826
2023-12-23 07:48:38 +01:00
searxng-bot 518dd97c89 [translations] update from Weblate
fc2dfc108 - 2023-12-21 - return42 <markus.heiser@darmarit.de>
3938cfbac - 2023-12-21 - return42 <markus.heiser@darmarit.de>
7b7286fba - 2023-12-21 - return42 <markus.heiser@darmarit.de>
1d066d218 - 2023-12-20 - sriramsekar <srirams_24@yahoo.com>
2023-12-23 07:40:02 +01:00
dependabot[bot] 2e52d06d18 Bump babel from 2.13.1 to 2.14.0
Bumps [babel](https://github.com/python-babel/babel) from 2.13.1 to 2.14.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.13.1...v2.14.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:39:26 +01:00
dependabot[bot] ed085a38bd Bump pylint from 3.0.2 to 3.0.3
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:31:57 +01:00
dependabot[bot] 2136c978ff Bump lxml from 4.9.3 to 4.9.4
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.3 to 4.9.4.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.3...lxml-4.9.4)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 07:30:50 +01:00
Bnyro 8a4104b992 [feat] engine: implementation of rotten tomatoes 2023-12-11 18:59:36 +01:00
Bnyro dda74fc9c9 [feat] engine: implementation of mdn 2023-12-11 18:57:40 +01:00
Bnyro b5b81c9806 [feat] engine: implementation of fyyd 2023-12-11 18:56:32 +01:00
Bnyro 527e13ab46 [feat] engine: implementation of podcastindex.org 2023-12-11 18:55:16 +01:00
Bnyro 3bc85c511c [mod] tootfinder: implement python module 2023-12-11 18:54:24 +01:00
Brock Vojkovic 0bcff32dd7 [fix] update check.searx.space IP addresses 2023-12-11 15:21:02 +01:00
dependabot[bot] 8effefa8db Bump selenium from 4.15.2 to 4.16.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.15.2 to 4.16.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits/selenium-4.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-10 19:26:02 +01:00
searxng-bot 574ed29d3e [translations] update from Weblate
fa2970d07 - 2023-12-08 - return42 <markus.heiser@darmarit.de>
f19144327 - 2023-12-07 - artnay <jiri.gronroos@iki.fi>
110f1b4db - 2023-12-05 - Ivan Gabaldon <admin@inetol.net>
c791e0c81 - 2023-12-07 - APoniatowski <adam@poniatowski.dev>
1f45cc83a - 2023-12-04 - akwceles <abadcopovisamuel@gmail.com>
5f93c2a39 - 2023-12-04 - return42 <markus.heiser@darmarit.de>
0d735b7aa - 2023-12-04 - return42 <markus.heiser@darmarit.de>
9cad06b09 - 2023-12-04 - akwceles <abadcopovisamuel@gmail.com>
97554eaa2 - 2023-12-03 - kirisameSoup <kirisoup@skiff.com>
2f4e19946 - 2023-12-03 - kirisameSoup <kirisoup@skiff.com>
d1dac8b5b - 2023-12-01 - Luna <github@luwuna.gay>
5c57f6eb5 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
4e3908a20 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
4d2b58e40 - 2023-12-01 - return42 <markus.heiser@darmarit.de>
43a40da4d - 2023-12-01 - return42 <markus.heiser@darmarit.de>
89f08502e - 2023-12-01 - return42 <markus.heiser@darmarit.de>
2023-12-08 08:42:24 +01:00
Markus Heiser 3829c253ff [mod] add option max_page to bing, brave, qwant, startpage & mojeek
[1] https://github.com/searxng/searxng/issues/2982#issuecomment-1808975780

Reported-by: @Damaj301damaj-lol [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-03 13:47:17 +01:00
Markus Heiser 2274d55d5a [mod] add option max_page
Related: https://github.com/searxng/searxng/issues/2982
Closes: https://github.com/searxng/searxng/issues/2972

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-12-03 13:47:17 +01:00
dependabot[bot] 1e0813fd3a Bump redis from 4.6.0 to 5.0.1
Bumps [redis](https://github.com/redis/redis-py) from 4.6.0 to 5.0.1.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v4.6.0...v5.0.1)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-03 13:31:02 +01:00
dalf 5a72977efa Update searx.data - update_currencies.py 2023-11-29 06:34:25 +01:00
dalf b18bef17a7 Update searx.data - update_engine_descriptions.py 2023-11-29 06:24:03 +01:00
dalf a136b0b44d Update searx.data - update_ahmia_blacklist.py 2023-11-29 06:18:21 +01:00
dalf 3ca84cb8d7 Update searx.data - update_wikidata_units.py 2023-11-29 06:17:32 +01:00
Coccocoa's Helper a85274eff5 Change the brand.env file to the original state 2023-11-28 09:31:54 +01:00
Bnyro bf75a8c2a0 [feat] engine: implementation of bpb 2023-11-27 16:46:41 +01:00
Bnyro 04cfce2eb8 [feat] yep: support for images and news (and safesearch) 2023-11-27 15:07:26 +01:00
Markus Heiser ee2675c999 [update] make pygments.less
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-27 14:43:43 +01:00
dependabot[bot] f23948eecc Bump pygments from 2.16.1 to 2.17.2
Bumps [pygments](https://github.com/pygments/pygments) from 2.16.1 to 2.17.2.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.16.1...2.17.2)

---
updated-dependencies:
- dependency-name: pygments
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:43:43 +01:00
dependabot[bot] a18761662a Bump certifi from 2023.7.22 to 2023.11.17
Bumps [certifi](https://github.com/certifi/python-certifi) from 2023.7.22 to 2023.11.17.
- [Commits](https://github.com/certifi/python-certifi/compare/2023.07.22...2023.11.17)

---
updated-dependencies:
- dependency-name: certifi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:39:03 +01:00
dependabot[bot] e06c720820 Bump splinter from 0.19.0 to 0.20.1
Bumps [splinter](https://github.com/cobrateam/splinter) from 0.19.0 to 0.20.1.
- [Release notes](https://github.com/cobrateam/splinter/releases)
- [Changelog](https://github.com/cobrateam/splinter/blob/master/docs/news.rst)
- [Commits](https://github.com/cobrateam/splinter/compare/0.19.0...0.20.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 14:34:38 +01:00
Markus Heiser 44392bd436 [mod] improve implementation of presearch engine
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-27 14:16:42 +01:00
Bnyro 23582aac5c [feat] implementation of presearch engine 2023-11-27 14:16:42 +01:00
obfuscated-loop 99fb565b39 [mod] Retain page numbers even when there are no results 2023-11-27 14:07:04 +01:00
Bnyro c3cc24be12 [feat] engine: implementation of destatis 2023-11-27 13:54:48 +01:00
searxng-bot a36eae1d68 [translations] update from Weblate
d0511fe50 - 2023-11-22 - return42 <markus.heiser@darmarit.de>
e5d09a011 - 2023-11-21 - 0que <0que@users.noreply.translate.codeberg.org>
111634b33 - 2023-11-21 - return42 <markus.heiser@darmarit.de>
29df37609 - 2023-11-21 - return42 <markus.heiser@darmarit.de>
bb415aca1 - 2023-11-21 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
4b05dce9f - 2023-11-21 - return42 <markus.heiser@darmarit.de>
2f730019b - 2023-11-20 - return42 <markus.heiser@darmarit.de>
389a46a05 - 2023-11-19 - alextecplayz <alextec70@outlook.com>
2620f6911 - 2023-11-20 - return42 <markus.heiser@darmarit.de>
716d7001d - 2023-11-20 - return42 <markus.heiser@darmarit.de>
30f17f24c - 2023-11-20 - return42 <markus.heiser@darmarit.de>
b7c4062e2 - 2023-11-19 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
7ba200bc5 - 2023-11-18 - Azharjan <alexander.um.edu@gmail.com>
2023-11-27 07:32:05 +01:00
obfuscated-loop cc6058057d [build] /static 2023-11-23 07:30:56 +01:00
obfuscated-loop 355d2dc678 [fix] Remove anchor tag outline in image results 2023-11-23 07:30:56 +01:00
searxng-bot e99ebb3dec [translations] update from Weblate
e245d1bd0 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
8ee33fca3 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
1c8c1557c - 2023-11-16 - return42 <markus.heiser@darmarit.de>
925c63f41 - 2023-11-16 - return42 <markus.heiser@darmarit.de>
15908183b - 2023-11-14 - return42 <markus.heiser@darmarit.de>
dd57115ef - 2023-11-12 - return42 <markus.heiser@darmarit.de>
9db7544d8 - 2023-11-11 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
23ce4d1f2 - 2023-11-12 - return42 <markus.heiser@darmarit.de>
902b8bafd - 2023-11-13 - tentsbet <remendne@pentrens.jp>
2350f4a05 - 2023-11-13 - ghose <correo@xmgz.eu>
10e6293fd - 2023-11-11 - gallegonovato <fran-carro@hotmail.es>
477881443 - 2023-11-13 - return42 <markus.heiser@darmarit.de>
556b2f611 - 2023-11-13 - Fjuro <ifjuro@proton.me>
3133818f8 - 2023-11-12 - return42 <markus.heiser@darmarit.de>
2023-11-22 09:43:45 +01:00
Paul Braeuning b3d29cb86d
Merge pull request #3006 from BernieHuang2008/fix-3003
fix: [BUG] Images cannot be clicked anymore
2023-11-14 16:11:29 +01:00
Jinyuan Huang 3601badd84 [build] /static 2023-11-14 13:34:44 +01:00
Jinyuan Huang 903449e0b5 [fix] Images cannot be clicked anymore #3006
URL in sidedbar only exists in HTTP POST requests.  On HTTP GET requests the
selector ``#search_url button#copy_url`` results in a ``null`` type and a
``.style.display`` raises::

   Uncaught TypeError: d.querySelector(...) is null

As a result, the initialization of the event handler is no longer carried out.

Closes: https://github.com/searxng/searxng/issues/3003
Suggested-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-14 13:28:50 +01:00
Markus Heiser 76b91a3ef6 [dev] manage runtime versions with asdf
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-12 20:54:57 +01:00
searxng-bot 79db70f2b7 [translations] update from Weblate
2b7f195db - 2023-11-09 - proton-penguin <cgshyuankai@proton.me>
411951c72 - 2023-11-09 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
878199f48 - 2023-11-06 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
512f9981a - 2023-11-05 - return42 <markus.heiser@darmarit.de>
adcaeb0c6 - 2023-11-05 - return42 <markus.heiser@darmarit.de>
acc01d46d - 2023-11-05 - return42 <markus.heiser@darmarit.de>
32f1dd13c - 2023-11-05 - RTRedreovic <RTRedreovic@users.noreply.translate.codeberg.org>
aafe161aa - 2023-11-03 - quenty_occitania <quentinantonin@free.fr>
c910601c9 - 2023-11-03 - return42 <markus.heiser@darmarit.de>
2023-11-12 20:54:35 +01:00
dependabot[bot] 6368f845c5 Bump yamllint from 1.32.0 to 1.33.0
Bumps [yamllint](https://github.com/adrienverge/yamllint) from 1.32.0 to 1.33.0.
- [Changelog](https://github.com/adrienverge/yamllint/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/adrienverge/yamllint/compare/v1.32.0...v1.33.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-12 20:52:09 +01:00
dependabot[bot] 3c1725bc9e Bump selenium from 4.15.1 to 4.15.2
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.15.1 to 4.15.2.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

---
updated-dependencies:
- dependency-name: selenium
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-12 20:51:32 +01:00
dependabot[bot] db7abeee06 Bump fasttext-predict from 0.9.2.1 to 0.9.2.2
Bumps [fasttext-predict](https://github.com/searxng/fasttext-predict) from 0.9.2.1 to 0.9.2.2.
- [Release notes](https://github.com/searxng/fasttext-predict/releases)
- [Commits](https://github.com/searxng/fasttext-predict/compare/v0.9.2.1...v0.9.2.2)

---
updated-dependencies:
- dependency-name: fasttext-predict
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-12 20:50:56 +01:00
Alexandre Flament bd3f526859
Docker: add UWSGI_WORKERS and UWSGI_THREAD environment variables (#2992)
* Docker: add UWSGI_WORKERS and UWSGI_THREAD.

UWSGI_WORKERS specifies the number of process.
UWSGI_THREADS specifies the number of threads.

The Docker convention is to specify the whole configuration
through environment variables. While not done in SearXNG, these two
additional variables allows admins to skip uwsgi.ini

In additional, https://github.com/searxng/preview-environments starts Docker
without additional files through searxng-helm-chat.
Each instance consumes 1Go of RAM which is a lot especially when there are a
lot of instances / pull requests.

* [scripts] add environments UWSGI_WORKERS and UWSGI_THREADS

- UWSGI_WORKERS specifies the number of process.
- UWSGI_THREADS specifies the number of threads.

Templates for uwsgi scripts can be tested by::

    UWSGI_WORKERS=8 UWSGI_THREADS=9 \
      ./utils/searxng.sh --cmd\
      eval "echo \"$(cat utils/templates/etc/uwsgi/*/searxng.ini*)\""\
      | grep "workers\|threads"

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

---------

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-12 16:46:34 +00:00
Paul Braeuning 7b1951aa97
Merge pull request #2835 from BernieHuang2008/auto-copy
[feature] added a "copy" button in `search url` sidebar.
2023-11-11 16:19:58 +01:00
Jinyuan Huang 727de1c4ef [build] /static 2023-11-10 13:28:28 +00:00
Jinyuan Huang 8adc7b0433 add a "copy" button to the "search-url" sidebar 2023-11-10 13:28:04 +00:00
searxng-bot 96ccec1aa6 [translations] update from Weblate
acdcdace8 - 2023-11-01 - Ivan Gabaldon <admin@inetol.net>
31a1602a9 - 2023-10-29 - return42 <markus.heiser@darmarit.de>
a1d1070d3 - 2023-10-29 - return42 <markus.heiser@darmarit.de>
2023-11-03 10:01:28 +01:00
dependabot[bot] dd0ccd7904 Bump selenium from 4.14.0 to 4.15.1
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.14.0 to 4.15.1.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 10:00:54 +01:00
dependabot[bot] baef837eb6 Bump linuxdoc from 20230827 to 20231020
Bumps [linuxdoc](https://github.com/return42/linuxdoc) from 20230827 to 20231020.
- [Changelog](https://github.com/return42/linuxdoc/blob/master/CHANGELOG)
- [Commits](https://github.com/return42/linuxdoc/commits)

---
updated-dependencies:
- dependency-name: linuxdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 09:59:06 +01:00
Markus Heiser b5a8ddfec8
Revert "[fix] limit maximum page number of a search query to page 50." (#2979)
This reverts commit 7e2e335dd1.
2023-11-01 16:55:20 +00:00
Markus Heiser d13a8f6453 [mod] document server:public_instance & remove it out of the botdetection
- the option server:public_instance lacks some documentation
- the processing of this option belongs in the limiter and not
  in botdetection module

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-01 06:44:56 +01:00
Markus Heiser fd814aac86 [mod] isolation of botdetection from the limiter
This patch was inspired by the discussion around PR-2882 [2].  The goals of this
patch are:

1. Convert plugin searx.plugin.limiter to normal code [1]
2. isolation of botdetection from the limiter [2]
3. searx/{tools => botdetection}/config.py and drop searx.tools
4. in URL /config, 'limiter.enabled' is true only if the limiter is really
   enabled (Redis is available).

This patch moves all the code that belongs to botdetection into namespace
searx.botdetection and code that belongs to limiter is placed in namespace
searx.limiter.

Tthe limiter used to be a plugin at some point botdetection was added, it was
not a plugin.  The modularization of these two components was long overdue.
With the clear modularization, the documentation could then also be organized
according to the architecture.

[1] https://github.com/searxng/searxng/pull/2882
[2] https://github.com/searxng/searxng/pull/2882#issuecomment-1741716891

To test:

- check the app works without the limiter, check `/config`
- check the app works with the limiter and with the token, check `/config`
- make docs.live .. and read
  - http://0.0.0.0:8000/admin/searx.limiter.html
  - http://0.0.0.0:8000/src/searx.botdetection.html#botdetection

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-11-01 06:44:56 +01:00
sev b05a15540e Check public_instance in simple theme
Fix #2975
2023-10-31 10:40:19 +01:00
Markus Heiser 7e2e335dd1 [fix] limit maximum page number of a search query to page 50.
To test this PR run a local instance and try to query page 51:

    http://127.0.0.1:8888/search?q=foo&pageno=51

A parameter exception will be raised:

    searx.exceptions.SearxParameterException: Invalid value "51" for parameter pageno

And the client will receive a HTTP 400 (Bad request).

Closes https://github.com/searxng/searxng/issues/2972

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-29 16:17:25 +01:00
Alexandre Flament 9aeae2142b Add support for Python 3.12 2023-10-29 11:25:58 +01:00
dalf b63841f0a1 Update searx.data - update_engine_traits.py 2023-10-29 09:04:24 +01:00
dependabot[bot] 12a83b8cb3 Bump babel from 2.13.0 to 2.13.1
Bumps [babel](https://github.com/python-babel/babel) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.13.0...v2.13.1)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 09:03:43 +01:00
dependabot[bot] 15c8301e52 Bump sphinx-tabs from 3.4.1 to 3.4.4
Bumps [sphinx-tabs](https://github.com/executablebooks/sphinx-tabs) from 3.4.1 to 3.4.4.
- [Release notes](https://github.com/executablebooks/sphinx-tabs/releases)
- [Changelog](https://github.com/executablebooks/sphinx-tabs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/executablebooks/sphinx-tabs/compare/v3.4.1...v3.4.4)

---
updated-dependencies:
- dependency-name: sphinx-tabs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 08:58:07 +01:00
dependabot[bot] cf605cf899 Bump uvloop from 0.18.0 to 0.19.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: uvloop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 08:54:32 +01:00
dalf a9d778ee0f Update searx.data - update_wikidata_units.py 2023-10-29 08:45:15 +01:00
dalf 92efb941d8 Update searx.data - update_firefox_version.py 2023-10-29 08:44:59 +01:00
dalf fa494b9be3 Update searx.data - update_currencies.py 2023-10-29 08:44:35 +01:00
dalf 1b92ea4e70 Update searx.data - update_engine_descriptions.py 2023-10-29 08:44:17 +01:00
dalf 55e7cb3e33 Update searx.data - update_ahmia_blacklist.py 2023-10-29 08:17:29 +01:00
dependabot[bot] dbe94f111a Bump pylint from 3.0.1 to 3.0.2
Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 10:47:10 +02:00
searxng-bot 6af8644ead [translations] update from Weblate
4e5e5db44 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
e1a8d3508 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
84bddfb89 - 2023-10-26 - return42 <markus.heiser@darmarit.de>
d67a4114d - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
62fe8e328 - 2023-10-26 - return42 <markus.heiser@darmarit.de>
6e37ab975 - 2023-10-26 - quenty_occitania <quentinantonin@free.fr>
2cdab3247 - 2023-10-25 - SomeTr <SomeTr@users.noreply.translate.codeberg.org>
cf7ea7234 - 2023-10-23 - clsty <celestial.y@outlook.com>
0ea313893 - 2023-10-23 - return42 <markus.heiser@darmarit.de>
22151e440 - 2023-10-23 - return42 <markus.heiser@darmarit.de>
e4eaf42b6 - 2023-10-22 - clsty <celestial.y@outlook.com>
2023-10-27 09:23:23 +02:00
dependabot[bot] 526d5c7b30 Bump uvloop from 0.17.0 to 0.18.0
Bumps [uvloop](https://github.com/MagicStack/uvloop) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/MagicStack/uvloop/releases)
- [Commits](https://github.com/MagicStack/uvloop/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: uvloop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 11:01:41 +02:00
Markus Heiser ef56e1d684 [fix] HTMLParser: undocumented not implemented method
In python versions <py3.10 there is an issue with an undocumented method
HTMLParser.error() [1][2] that was deprecated in Python 3.4 and removed
in Python 3.5.

To be compatible to higher versions (>=py3.10) an error method is implemented
which throws an AssertionError exception like the higher Python versions do [3].

[1] https://github.com/python/cpython/issues/76025
[2] https://bugs.python.org/issue31844
[3] https://github.com/python/cpython/pull/8562

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-22 10:35:02 +02:00
searxng-bot 01b5b9cb8e [translations] update from Weblate
2325f1583 - 2023-10-20 - return42 <markus.heiser@darmarit.de>
5090c6a8e - 2023-10-18 - return42 <markus.heiser@darmarit.de>
3a38219d8 - 2023-10-18 - return42 <markus.heiser@darmarit.de>
94a9f4164 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
bdbeb4b30 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
f9b483f48 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
7f1ca1997 - 2023-10-16 - return42 <markus.heiser@darmarit.de>
c5a701dc4 - 2023-10-14 - alexgabi <alexgabi@disroot.org>
2023-10-20 10:44:11 +02:00
Markus Heiser b013cbb4cc [build] /static 2023-10-13 12:56:29 +02:00
Bnyro df2e41c150 [fix] search.js: crash on homepage when setting form listeners 2023-10-13 12:56:29 +02:00
Markus Heiser 70521339d9 [fix] black --exclude option is a regular expression
When ``searx/static/themes/simple/node_modules`` are installed the test from
black runs into this path / Error::

    $ make test
    TEST      [yamllint] $YAMLLINT_FILES
    TEST      [black] $BLACK_TARGETS
    --- searx/static/themes/simple/node_modules/flatted/python/test.py	2023-10-13 10:09:50.460026 +0000
    +++ searx/static/themes/simple/node_modules/flatted/python/test.py	2023-10-13 10:10:04.974335 +0000
    @@ -1,9 +1,11 @@
    from flatted import stringify as _stringify, parse
    ...

black --exclude option is not a comma separated list, its a regular expression /
see:

    $ black --help
    ...
    --exclude TEXT   A regular expression that matches files and
                     directories that should be excluded on recursive
                     searches ...

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-13 12:44:18 +02:00
dependabot[bot] 7ee1d035bf Bump flask from 2.3.3 to 3.0.0
Bumps [flask](https://github.com/pallets/flask) from 2.3.3 to 3.0.0.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/2.3.3...3.0.0)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 11:49:17 +02:00
Émilien (perso) 4280318fc5 fixing results parsing brave 2023-10-13 11:47:30 +02:00
dependabot[bot] 7f59b6d62e Bump flask-babel from 3.1.0 to 4.0.0
Bumps [flask-babel](https://github.com/python-babel/flask-babel) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/python-babel/flask-babel/releases)
- [Changelog](https://github.com/python-babel/flask-babel/blob/master/CHANGELOG)
- [Commits](https://github.com/python-babel/flask-babel/compare/v3.1.0...v4.0.0)

---
updated-dependencies:
- dependency-name: flask-babel
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 09:51:30 +02:00
dependabot[bot] 32d52cd856 Bump selenium from 4.13.0 to 4.14.0
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.13.0 to 4.14.0.
- [Release notes](https://github.com/SeleniumHQ/Selenium/releases)
- [Commits](https://github.com/SeleniumHQ/Selenium/compare/selenium-4.13.0...selenium-4.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 09:33:04 +02:00
searxng-bot ac82daf58d [translations] update from Weblate
74e401e68 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
897dd8db1 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
6ed046a90 - 2023-10-09 - tentsbet <remendne@pentrens.jp>
815ecb336 - 2023-10-09 - return42 <markus.heiser@darmarit.de>
65d9a0c2f - 2023-10-07 - return42 <markus.heiser@darmarit.de>
3ec249ef9 - 2023-10-07 - return42 <markus.heiser@darmarit.de>
53dc6c108 - 2023-10-07 - return42 <markus.heiser@darmarit.de>
2023-10-13 09:20:54 +02:00
Hackurei efada7cba2 [fix] hackernews keyerror problem 2023-10-13 08:16:47 +02:00
Hackurei af071121de [fix] imgur - incorrect wikidata id 2023-10-12 09:14:00 +02:00
Markus Heiser 14323d683f [fix] ddg-lite & ddg-extra: don't send empty vqd value
DDG's bot detection is sensitive to the vqd value.  For some search terms (such
as extremely long search terms that are often sent by bots), no vqd value can be
determined.

If SearXNG cannot determine a vqd value, then no request should go out to
DDG (WEB): a request with a wrong vqd value leads to DDG temporarily putting
SearXNG's IP on a block list.

Requests from IPs in this block list run into timeouts.

Not sure, but it seems the block list is a sliding window: to get my IP rid from
the bot list I had to cool down my IP for 1h (send no requests from that IP to
DDG).

Since such issues can't reproduce in a local instance I tested this patch 24h on
my public SearXNG instance: There are still errors (rare), but the reliability
is still 100%.

Related:

- https://github.com/searxng/searxng/pull/2922
- https://github.com/searxng/searxng/pull/2923

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-12 08:52:28 +02:00
Umut Ucak 24561370b7 readme typo 2023-10-11 06:19:31 +02:00
Markus Heiser 3388441917 [fix] ddg-lite vqd value: some search terms do not have a vqd value
Some search terms do not have results and therefore no vqd value

BTW: remove a leftover from 9197efa

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-10 09:12:30 +02:00
Markus Heiser 9197efa2a7 [fix] duckduckgo lite engine: set HTTP header 'Referer'
We have had problems with this before, the bot protection from ddg-lite seems to
have included this referer in the rating [1][2].

From reverse engineering:

- The Referer ``https://google.com/`` was set in commt 257dc7d6c4 --> DDG lite
  does not like this referer anymore!

- The 'Referer' header is only set on second and follow up pages but not on the
  first page

- The vqd value is not needed on the first page, the ddg-lite client sets this
  value only on follow up pages / this can help to reduce the vqd requests from
  SearXNG.

Related to 'Referer' header & ddg requests:

[1] https://github.com/searxng/searxng/pull/2161
[2] https://github.com/searxng/searxng/pull/2081

Closes: https://github.com/searxng/searxng/issues/2796
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-10 08:40:53 +02:00
Bnyro fa5b2a7948 [mod] yacy: use official instance by default and fix crashes 2023-10-09 20:50:24 +02:00
Alex Balgavy 5d53aac20f [mod] add hotkeys option to settings.yml
The change in the hotkey mechanism introduced in 317db5b04 does not allow
configuration via `settings.yml`.  This commit adds that functionality.

Closes: #2898
2023-10-09 18:13:00 +02:00
Hackurei ff78b1a902 [feat] implement hackernews engine - news.ycombinator.com 2023-10-09 14:00:04 +02:00
Aine 213cb74378 [fix] matrixrooms add proper MRS integration
Related:

- https://github.com/searxng/searxng/issues/2918
2023-10-09 13:25:13 +02:00
Bnyro 48cb58bd2e [feat] duckduckgo: support for videos and news 2023-10-09 06:53:43 +02:00
Bnyro c3ab49cd90 [fix] kickass: crash when no results 2023-10-07 11:48:23 +02:00
Bnyro f22daf8b47 [mod] piped: always show video length if available 2023-10-07 11:45:46 +02:00
Bnyro ce270961e8 [feat] engine: implementation of mastodon 2023-10-06 10:58:23 +02:00
dependabot[bot] e5e3e22f7c Bump nose2[coverage_plugin] from 0.13.0 to 0.14.0
Bumps [nose2[coverage_plugin]](https://github.com/nose-devs/nose2) from 0.13.0 to 0.14.0.
- [Changelog](https://github.com/nose-devs/nose2/blob/main/docs/changelog.rst)
- [Commits](https://github.com/nose-devs/nose2/compare/0.13.0...0.14.0)

---
updated-dependencies:
- dependency-name: nose2[coverage_plugin]
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:29:40 +02:00
dependabot[bot] 60fecf5125 Bump setproctitle from 1.3.2 to 1.3.3
Bumps [setproctitle](https://github.com/dvarrazzo/py-setproctitle) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/dvarrazzo/py-setproctitle/releases)
- [Changelog](https://github.com/dvarrazzo/py-setproctitle/blob/master/HISTORY.rst)
- [Commits](https://github.com/dvarrazzo/py-setproctitle/compare/version-1.3.2...version-1.3.3)

---
updated-dependencies:
- dependency-name: setproctitle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:29:12 +02:00
dependabot[bot] f7ca979c8a Bump pylint from 2.17.6 to 3.0.1
Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.17.6 to 3.0.1.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](https://github.com/pylint-dev/pylint/compare/v2.17.6...v3.0.1)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:22:57 +02:00
dependabot[bot] 4d3c4ff738 Bump babel from 2.12.1 to 2.13.0
Bumps [babel](https://github.com/python-babel/babel) from 2.12.1 to 2.13.0.
- [Release notes](https://github.com/python-babel/babel/releases)
- [Changelog](https://github.com/python-babel/babel/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-babel/babel/compare/v2.12.1...v2.13.0)

---
updated-dependencies:
- dependency-name: babel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 10:22:30 +02:00
searxng-bot 48f8ac48d1 [translations] update from Weblate
68d743281 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
42f091b7f - 2023-10-05 - return42 <markus.heiser@darmarit.de>
2479c0d7b - 2023-10-05 - ghose <correo@xmgz.eu>
a4e6cd592 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
9d4e5f5c3 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
b79d44775 - 2023-10-05 - gallegonovato <fran-carro@hotmail.es>
746291184 - 2023-10-06 - return42 <markus.heiser@darmarit.de>
f24d7e8b1 - 2023-10-05 - return42 <markus.heiser@darmarit.de>
6140911f9 - 2023-10-05 - Fjuro <ifjuro@proton.me>
2023-10-06 09:19:00 +02:00
501 changed files with 78442 additions and 67610 deletions

View file

@ -16,6 +16,9 @@ max_line_length = 119
[*.html]
indent_size = 4
[*.js]
indent_size = 2
[*.json]
indent_size = 4
insert_final_newline = ignore

View file

@ -1,4 +1,4 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "pip"
@ -8,6 +8,9 @@ updates:
day: "friday"
open-pull-requests-limit: 5
target-branch: "master"
commit-message:
prefix: "[upd] pypi:"
- package-ecosystem: "npm"
directory: "/searx/static/themes/simple"
schedule:
@ -15,3 +18,5 @@ updates:
day: "friday"
open-pull-requests-limit: 5
target-branch: "master"
commit-message:
prefix: "[upd] npm:"

31
.github/workflows/checker.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: "Checker"
on:
schedule:
- cron: "0 4 * * 5"
workflow_dispatch:
jobs:
checker:
name: Checker
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ubuntu packages
run: |
sudo ./utils/searxng.sh install packages
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Install Python dependencies
run: |
make V=1 install
- name: Checker
run: |
make search.checker

View file

@ -48,16 +48,16 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update searx.data - ${{ matrix.fetch }}
commit-message: '[data] update searx.data - ${{ matrix.fetch }}'
committer: searxng-bot <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_data_${{ matrix.fetch }}
delete-branch: true
draft: false
title: 'Update searx.data - ${{ matrix.fetch }}'
title: '[data] update searx.data - ${{ matrix.fetch }}'
body: |
Update searx.data - ${{ matrix.fetch }}
update searx.data - ${{ matrix.fetch }}
labels: |
data

View file

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -120,7 +120,7 @@ jobs:
FOLDER: dist/docs
CLEAN: true # Automatically remove deleted files from the deploy branch
SINGLE_COMMIT: True
COMMIT_MESSAGE: build from commit ${{ github.sha }}
COMMIT_MESSAGE: '[doc] build from commit ${{ github.sha }}'
babel:
name: Update translations branch
@ -163,7 +163,6 @@ jobs:
- name: Update transations
id: update
run: |
git restore utils/brand.env
make V=1 weblate.push.translations
dockers:

View file

@ -45,15 +45,15 @@ jobs:
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.WEBLATE_GITHUB_TOKEN }}
commit-message: Update translations
commit-message: '[l10n] update translations from Weblate'
committer: searxng-bot <searxng-bot@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: translations_update
delete-branch: true
draft: false
title: 'Update translations'
title: '[l10n] update translations from Weblate'
body: |
Update translations
update translations from Weblate
labels: |
translation

3
.gitignore vendored
View file

@ -23,3 +23,6 @@ gh-pages/
.idea/
searx/version_frozen.py
.dir-locals.el
.python-version

2
.nvmrc
View file

@ -1 +1 @@
v16.20.2
v20.10

View file

@ -1,4 +1,4 @@
# -*- coding: utf-8; mode: conf -*-
# -*- coding: utf-8; mode: conf-unix -*-
# lint Python modules using external checkers.
#
# This is the main checker controlling the other ones and the reports
@ -27,7 +27,7 @@ ignore-patterns=
#init-hook=
# Use multiple processes to speed up Pylint.
jobs=1
jobs=0
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.

2
.tool-versions Normal file
View file

@ -0,0 +1,2 @@
python 3.12.0
shellcheck 0.9.0

View file

@ -169,4 +169,6 @@ features or generally made searx better:
- @llmII
- @blob42 `<https://blob42.xyz>`_
- Paolo Basso `<https://github.com/paolobasso99>`
- Bernie Huang `<https://github.com/BernieHuang2008>`
- Bernie Huang `<https://github.com/BernieHuang2008>`
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
- @micsthepick

View file

@ -2,7 +2,7 @@
## Resources in the documentation
* [Development quickstart](https://docs.searxng.org/dev/contribution_guide.html)
* [Development quickstart](https://docs.searxng.org/dev/quickstart.html)
* [Contribution guide](https://docs.searxng.org/dev/contribution_guide.html)
## Submitting PRs

View file

@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.19
ENTRYPOINT ["/sbin/tini","--","/usr/local/searxng/dockerfiles/docker-entrypoint.sh"]
EXPOSE 8080
VOLUME /etc/searxng
@ -15,7 +15,9 @@ ENV INSTANCE_NAME=searxng \
MORTY_KEY= \
MORTY_URL= \
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini \
UWSGI_WORKERS=%k \
UWSGI_THREADS=4
WORKDIR /usr/local/searxng
@ -43,7 +45,7 @@ RUN apk add --no-cache -t build-dependencies \
uwsgi \
uwsgi-python3 \
brotli \
&& pip3 install --no-cache -r requirements.txt \
&& pip3 install --break-system-packages --no-cache -r requirements.txt \
&& apk del build-dependencies \
&& rm -rf /root/.cache

View file

@ -44,10 +44,10 @@ lxc.clean:
PHONY += search.checker search.checker.%
search.checker: install
$(Q)./manage pyenv.cmd searx-checker -v
$(Q)./manage pyenv.cmd searxng-checker -v
search.checker.%: install
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
$(Q)./manage pyenv.cmd searxng-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
PHONY += test ci.test test.shell
ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.pybabel
@ -56,7 +56,7 @@ test.shell:
$(Q)shellcheck -x -s dash \
dockerfiles/docker-entrypoint.sh
$(Q)shellcheck -x -s bash \
utils/brand.env \
utils/brand.sh \
$(MTOOLS) \
utils/lib.sh \
utils/lib_sxng*.sh \
@ -74,16 +74,14 @@ test.shell:
# wrap ./manage script
MANAGE += buildenv
MANAGE += weblate.translations.commit weblate.push.translations
MANAGE += data.all data.traits data.useragents
MANAGE += data.all data.traits data.useragents data.locales
MANAGE += docs.html docs.live docs.gh-pages docs.prebuild docs.clean
MANAGE += docker.build docker.push docker.buildx
MANAGE += gecko.driver
MANAGE += node.env node.env.dev node.clean
MANAGE += py.build py.clean
MANAGE += pyenv pyenv.install pyenv.uninstall
MANAGE += pypi.upload pypi.upload.test
MANAGE += format.python
MANAGE += test.yamllint test.pylint test.pyright test.black test.pybabel test.unit test.coverage test.robot test.rst test.clean
MANAGE += themes.all themes.simple themes.simple.test pygments.less

View file

@ -121,9 +121,9 @@ You can contribute from your browser using `GitHub Codespaces`_:
- Click on the ``Codespaces`` tab instead of ``Local``
- Click on ``Create codespace on master``
- VSCode is going to start in the browser
- Wait for ``git pull && make install`` to appears and then to disapear
- Wait for ``git pull && make install`` to appear and then disappear
- You have `120 hours per month`_ (see also your `list of existing Codespaces`_)
- You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``.
- You can start SearXNG using ``make run`` in the terminal or by pressing ``Ctrl+Shift+B``
.. _GitHub Codespaces: https://docs.github.com/en/codespaces/overview
.. _120 hours per month: https://github.com/settings/billing

View file

@ -4,8 +4,12 @@ uid = searxng
gid = searxng
# Number of workers (usually CPU count)
workers = %k
threads = 4
# default value: %k (= number of CPU core, see Dockerfile)
workers = $(UWSGI_WORKERS)
# Number of threads per worker
# default value: 4 (see Dockerfile)
threads = $(UWSGI_THREADS)
# The right granted on the created socket
chmod-socket = 666
@ -38,6 +42,10 @@ buffer-size = 8192
# See https://github.com/searx/searx-docker/issues/24
add-header = Connection: close
# Follow SIGTERM convention
# See https://github.com/searxng/searxng/issues/3427
die-on-term
# uwsgi serves the static files
static-map = /static=/usr/local/searxng/searx/static
# expires set to one day

View file

@ -15,7 +15,7 @@ Administrator documentation
installation-apache
update-searxng
answer-captcha
searx.botdetection
searx.limiter
api
architecture
plugins

View file

@ -92,6 +92,9 @@ instance using `docker run <https://docs.docker.com/engine/reference/run/>`_:
searxng/searxng
2f998.... # container's ID
The environment variables UWSGI_WORKERS and UWSGI_THREADS overwrite the default
number of UWSGI processes and UWSGI threads specified in `/etc/searxng/uwsgi.ini`.
Open your WEB browser and visit the URL:
.. code:: sh

View file

@ -0,0 +1,17 @@
.. _limiter:
=======
Limiter
=======
.. sidebar:: info
The limiter requires a :ref:`Redis <settings redis>` database.
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.limiter
:members:

View file

@ -12,35 +12,38 @@
bind_address: "127.0.0.1"
secret_key: "ultrasecretkey" # change this!
limiter: false
public_instance: false
image_proxy: false
default_http_headers:
X-Content-Type-Options : nosniff
X-XSS-Protection : 1; mode=block
X-Download-Options : noopen
X-Robots-Tag : noindex, nofollow
Referrer-Policy : no-referrer
``base_url`` : ``$SEARXNG_URL`` :ref:`buildenv <make buildenv>`
``base_url`` : ``$SEARXNG_URL``
The base URL where SearXNG is deployed. Used to create correct inbound links.
If you change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
``port`` & ``bind_address``: ``$SEARXNG_PORT`` & ``$SEARXNG_BIND_ADDRESS`` :ref:`buildenv <make buildenv>`
``port`` & ``bind_address``: ``$SEARXNG_PORT`` & ``$SEARXNG_BIND_ADDRESS``
Port number and *bind address* of the SearXNG web application if you run it
directly using ``python searx/webapp.py``. Doesn't apply to a SearXNG
services running behind a proxy and using socket communications. If you
change the value, don't forget to rebuild instance's environment
(:ref:`utils/brand.env <make buildenv>`)
services running behind a proxy and using socket communications.
``secret_key`` : ``$SEARXNG_SECRET``
Used for cryptography purpose.
.. _limiter:
``limiter`` :
Rate limit the number of request on the instance, block some bots. The
:ref:`limiter src` requires a :ref:`settings redis` database.
:ref:`limiter` requires a :ref:`settings redis` database.
.. _public_instance:
``public_instance`` :
Setting that allows to enable features specifically for public instances (not
needed for local usage). By set to ``true`` the following features are
activated:
- :py:obj:`searx.botdetection.link_token` in the :ref:`limiter`
.. _image_proxy:

View file

@ -20,6 +20,7 @@
theme_args:
simple_style: auto
search_on_category_select: true
hotkeys: default
.. _static_use_hash:
@ -64,3 +65,6 @@
``search_on_category_select``:
Perform search immediately if a category selected. Disable to select multiple categories.
``hotkeys``:
Hotkeys to use in the search interface: ``default``, ``vim`` (Vim-like).

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: AGPL-3.0-or-later
import sys, os
from pathlib import Path
from pallets_sphinx_themes import ProjectLink
from searx import get_setting
@ -13,7 +13,6 @@ project = 'SearXNG'
copyright = 'SearXNG team'
author = 'SearXNG team'
release, version = VERSION_STRING, VERSION_STRING
SEARXNG_URL = get_setting('server.base_url') or 'https://example.org/searxng'
ISSUE_URL = get_setting('brand.issue_url')
DOCS_URL = get_setting('brand.docs_url')
@ -22,6 +21,9 @@ PRIVACYPOLICY_URL = get_setting('general.privacypolicy_url')
CONTACT_URL = get_setting('general.contact_url')
WIKI_URL = get_setting('brand.wiki_url')
SOURCEDIR = Path(__file__).parent.parent / "searx"
os.environ['SOURCEDIR'] = str(SOURCEDIR)
# hint: sphinx.ext.viewcode won't highlight when 'highlight_language' [1] is set
# to string 'none' [2]
#

View file

@ -271,22 +271,54 @@ type.
``images``
----------
.. table:: Parameter of the **images** media type:
.. list-table:: Parameter of the **images** media type
:header-rows: 2
:width: 100%
========================= =====================================================
result-parameter information
------------------------- -----------------------------------------------------
template is set to ``images.html``
========================= =====================================================
url string, url to the result site
title string, title of the result *(partly implemented)*
content *(partly implemented)*
publishedDate :py:class:`datetime.datetime`,
time of publish *(partly implemented)*
img\_src string, url to the result image
thumbnail\_src string, url to a small-preview image
========================= =====================================================
* - result-parameter
- Python type
- information
* - template
- :py:class:`str`
- is set to ``images.html``
* - url
- :py:class:`str`
- url to the result site
* - title
- :py:class:`str`
- title of the result
* - content
- :py:class:`str`
- description of the image
* - publishedDate
- :py:class:`datetime <datetime.datetime>`
- time of publish
* - img_src
- :py:class:`str`
- url to the result image
* - thumbnail_src
- :py:class:`str`
- url to a small-preview image
* - resolution
- :py:class:`str`
- the resolution of the image (e.g. ``1920 x 1080`` pixel)
* - img_format
- :py:class:`str`
- the format of the image (e.g. ``png``)
* - filesize
- :py:class:`str`
- size of bytes in :py:obj:`human readable <searx.humanize_bytes>` notation
(e.g. ``MB`` for 1024 \* 1024 Bytes filesize).
.. _template videos:
@ -466,3 +498,68 @@ type.
- :py:class:`str`
- URL to full article, HTML version
.. _template packages:
``packages``
------------
.. list-table:: Parameter of the **packages** media type
:header-rows: 2
:width: 100%
* - result-parameter
- Python type
- information
* - template
- :py:class:`str`
- is set to ``packages.html``
* - title
- :py:class:`str`
- title of the result
* - content
- :py:class:`str`
- abstract
* - package_name
- :py:class:`str`
- the name of the package
* - version
- :py:class:`str`
- the current version of the package
* - maintainer
- :py:class:`str`
- the maintainer or author of the project
* - publishedDate
- :py:class:`datetime <datetime.datetime>`
- date of latest update or release
* - tags
- :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- free tag list
* - popularity
- :py:class:`str`
- the popularity of the package, e.g. rating or download count
* - license_name
- :py:class:`str`
- the name of the license
* - license_url
- :py:class:`str`
- the web location of a license copy
* - homepage
- :py:class:`str`
- the url of the project's homepage
* - source_code_url
- :py:class:`str`
- the location of the project's source code

View file

@ -0,0 +1,13 @@
.. _bpb engine:
===
Bpb
===
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.bpb
:members:

View file

@ -12,7 +12,7 @@ DuckDuckGo Engines
.. automodule:: searx.engines.duckduckgo
:members:
.. automodule:: searx.engines.duckduckgo_images
.. automodule:: searx.engines.duckduckgo_extra
:members:
.. automodule:: searx.engines.duckduckgo_definitions

View file

@ -0,0 +1,13 @@
.. _mastodon engine:
========
Mastodon
========
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mastodon
:members:

View file

@ -0,0 +1,13 @@
.. _mrs engine:
=========================
Matrix Rooms Search (MRS)
=========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mrs
:members:

View file

@ -0,0 +1,13 @@
.. _voidlinux mullvad_leta:
============
Mullvad-Leta
============
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.mullvad_leta
:members:

View file

@ -0,0 +1,13 @@
.. _engine presearch:
================
Presearch Engine
================
.. contents::
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.presearch
:members:

View file

@ -0,0 +1,13 @@
.. _voidlinux engine:
==========================
Void Linux binary packages
==========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. automodule:: searx.engines.voidlinux
:members:

View file

@ -6,6 +6,7 @@ Developer documentation
:maxdepth: 2
quickstart
rtm_asdf
contribution_guide
engines/index
search_api

View file

@ -61,13 +61,9 @@ working tree and release a ``make install`` to get a virtualenv with a
$ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
Successfully installed searxng-2023.7.19+a446dea1b
If you release ``make install`` multiple times the installation will only
rebuild if the sha256 sum of the *requirement files* fails. With other words:
@ -82,13 +78,9 @@ the check fails if you edit the requirements listed in
...
PYENV [virtualenv] installing ./requirements*.txt into local/py3
...
PYENV OK
PYENV [install] pip install -e 'searx[test]'
...
Successfully installed argparse-1.4.0 searx
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
BUILDENV INFO:searx:Initialisation done
BUILDENV build utils/brand.env
Successfully installed searxng-2023.7.19+a446dea1b
.. sidebar:: drop environment
@ -98,67 +90,6 @@ the check fails if you edit the requirements listed in
If you think, something goes wrong with your ./local environment or you change
the :origin:`setup.py` file, you have to call :ref:`make clean`.
.. _make buildenv:
``make buildenv``
=================
Rebuild instance's environment with the modified settings from the
:ref:`settings brand` and :ref:`settings server` section of your
:ref:`settings.yml <settings location>`.
What is the :origin:`utils/brand.env` needed for and why do you need to rebuild
it if necessary?
Short answer: :ref:`installation and maintenance <searxng maintenance>`
scripts are running outside of instance's runtime environment and need some
values defined in the runtime environment.
All the SearXNG setups are centralized in the :ref:`settings.yml` file. This
setup is available as long we are in a *installed instance*. E.g. the
*installed instance* on the server or the *installed developer instance* at
``./local`` (the later one is created by a :ref:`make install <make install>` or
:ref:`make run <make run>`).
Tasks running outside of an *installed instance*, especially :ref:`installation
and maintenance <searxng maintenance>` tasks running at (pre-) installation time
do not have access to the SearXNG setup (from a *installed instance*). Those
tasks need a *build environment*.
The ``make buildenv`` target will update the *build environment* in:
- :origin:`utils/brand.env`
Tasks running outside of an *installed instance*, need the following settings
from the YAML configuration:
- ``SEARXNG_URL`` from :ref:`server.base_url <settings server>` (aka
``PUBLIC_URL``)
- ``SEARXNG_BIND_ADDRESS`` from :ref:`server.bind_address <settings server>`
- ``SEARXNG_PORT`` from :ref:`server.port <settings server>`
The ``GIT_URL`` and ``GIT_BRANCH`` in the origin:`utils/brand.env` file, are
read from the git VCS and the branch that is checked out when ``make
buildenv`` command runs.
.. _brand:
**I would like to create my own brand, how should I proceed?**
Create a remote branch (``example.org``), checkout the remote branch (on your
local developer desktop) and in the :origin:`searx/settings.yml` file in the
:ref:`settings server` section set ``base_url``. Run ``make buildenv`` and
create a commit for your brand.
On your server you clone the branch (``example.org``) into your HOME folder
``~`` from where you run the :ref:`installation <installation>` and
:ref:`maintenance <searxng maintenance>` task.
To upgrade you brand, rebase on SearXNG's master branch (on your local
developer desktop), force push it to your remote branch. Go to your server, do
a force pull and run :ref:`sudo -H ./utils/searxng.sh instance update <update
searxng>`.
.. _make node.env:
Node.js environment (``make node.env``)

View file

@ -292,7 +292,7 @@ content becomes smart.
files & folders origin :origin:`docs/dev/reST.rst` ``:origin:`docs/dev/reST.rst```
pull request :pull:`4` ``:pull:`4```
patch :patch:`af2cae6` ``:patch:`af2cae6```
PyPi package :pypi:`searx` ``:pypi:`searx```
PyPi package :pypi:`httpx` ``:pypi:`httpx```
manual page man :man:`bash` ``:man:`bash```
intersphinx_
--------------------------------------------------------------------------------------------------

121
docs/dev/rtm_asdf.rst Normal file
View file

@ -0,0 +1,121 @@
==================
Runtime Management
==================
The runtimes are managed with asdf and are activated in this project via the
`.tool-versions <.tool-versions>`_. If you have not yet installed asdf_, then
chapter :ref:`introduce asdf` may be of help to you.
.. contents::
:depth: 2
:local:
:backlinks: entry
Get started
===========
If you have asdf installed you can install the runtimes of this project by:
.. code:: bash
$ cd /path/to/searxng
$ asdf install # will install runtimes listed in .tool-versions
...
Manage Versions
===============
If you want to perform a ``test`` with special runtime versions of nodejs,
python or shellcheck, you can patch the ``.tool-versions``:
.. code:: diff
--- a/.tool-versions
+++ b/.tool-versions
@@ -1,2 +1,2 @@
-python 3.12.0
-shellcheck 0.9.0
+python 3.11.6
+shellcheck 0.8.0
To install use ``asdf install`` again. If the runtime tools have changed, any
existing (nodejs and python) environments should be cleaned up with a ``make
clean``.
.. code:: bash
$ asdf install
...
$ make clean test
.. _introduce asdf:
Introduce asdf
==============
To `download asdf`_ and `install asdf`_:
.. code:: bash
$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch <version>
$ echo '. "$HOME/.asdf/asdf.sh"' >> ~/.bashrc
$ echo '. "$HOME/.asdf/completions/asdf.bash"' >> ~/.bashrc
Start a new shell and try to `install plugins`_:
.. code:: bash
$ asdf plugin-list-all | grep -E '(golang|python|nodejs|shellcheck).git'
golang https://github.com/asdf-community/asdf-golang.git
nodejs https://github.com/asdf-vm/asdf-nodejs.git
python https://github.com/danhper/asdf-python.git
shellcheck https://github.com/luizm/asdf-shellcheck.git
$ asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
$ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
$ asdf plugin add python https://github.com/danhper/asdf-python.git
$ asdf plugin add shellcheck https://github.com/luizm/asdf-shellcheck.git
Each plugin has dependencies, to compile runtimes visit the URLs from above and
look out for the dependencies you need to install on your OS, on Debian for the
runtimes listed above you will need:
.. code:: bash
$ sudo apt update
$ sudo apt install \
dirmngr gpg curl gawk coreutils build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
With dependencies installed you can install/compile runtimes:
.. code:: bash
$ asdf install golang latest
$ asdf install nodejs latest
$ asdf install python latest
$ asdf install shellcheck latest
Python will be compiled and will take a while.
In the repository the version is defined in `.tool-versions`_. Outside the
repository, its recommended that the runtime should use the versions of the OS
(`Fallback to System Version`_) / if not already done register the system
versions global:
.. code:: bash
$ cd /
$ asdf global golang system
$ asdf global nodejs system
$ asdf global python system
$ asdf global shellcheck system
.. _asdf: https://asdf-vm.com/
.. _download asdf: https://asdf-vm.com/guide/getting-started.html#_2-download-asdf
.. _install asdf: https://asdf-vm.com/guide/getting-started.html#_3-install-asdf
.. _install plugins: https://asdf-vm.com/guide/getting-started.html#install-the-plugin
.. _Fallback to System Version: https://asdf-vm.com/manage/versions.html#fallback-to-system-version

View file

@ -69,7 +69,7 @@ Parameters
``autocomplete`` : default from :ref:`settings search`
[ ``google``, ``dbpedia``, ``duckduckgo``, ``mwmbl``, ``startpage``,
``wikipedia``, ``swisscows``, ``qwant`` ]
``wikipedia``, ``stract``, ``swisscows``, ``qwant`` ]
Service which completes words as you type.

View file

@ -78,6 +78,16 @@ Scripts to update static data in :origin:`searx/data/`
.. automodule:: searxng_extra.update.update_pygments
:members:
.. _update_locales.py:
``update_locales.py``
=====================
:origin:`[source] <searxng_extra/update/update_locales.py>`
.. automodule:: searxng_extra.update.update_locales
:members:
``update_wikidata_units.py``
============================

View file

@ -12,8 +12,10 @@ Bot Detection
.. automodule:: searx.botdetection
:members:
.. automodule:: searx.botdetection.limiter
:members:
.. _botdetection ip_lists:
IP lists
========
.. automodule:: searx.botdetection.ip_lists
:members:
@ -50,3 +52,11 @@ Probe HTTP headers
.. automodule:: searx.botdetection.http_user_agent
:members:
.. _botdetection config:
Config
======
.. automodule:: searx.botdetection.config
:members:

View file

@ -10,11 +10,6 @@ Locales
:backlinks: entry
.. automodule:: searx.locales
:members:
:members:
SearXNG's locale codes
======================
.. automodule:: searx.sxng_locales
:members:

View file

@ -1,25 +0,0 @@
categories = ['general'] # optional
def request(query, params):
'''pre-request callback
params<dict>:
method : POST/GET
headers : {}
data : {} # if method == POST
url : ''
category: 'search category'
pageno : 1 # number of the requested page
'''
params['url'] = 'https://host/%s' % query
return params
def response(resp):
'''post-response callback
resp: requests response object
'''
return [{'url': '', 'title': '', 'content': ''}]

70
manage
View file

@ -41,10 +41,10 @@ PATH="${REPO_ROOT}/node_modules/.bin:${PATH}"
PYOBJECTS="searx"
PY_SETUP_EXTRAS='[test]'
GECKODRIVER_VERSION="v0.33.0"
GECKODRIVER_VERSION="v0.34.0"
# SPHINXOPTS=
BLACK_OPTIONS=("--target-version" "py311" "--line-length" "120" "--skip-string-normalization")
BLACK_TARGETS=("--exclude" "searx/static,searx/languages.py" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests")
BLACK_TARGETS=("--exclude" "(searx/static|searx/languages.py)" "--include" 'searxng.msg|\.pyi?$' "searx" "searxng_extra" "tests")
_dev_redis_sock="/usr/local/searxng-redis/run/redis.sock"
# set SEARXNG_REDIS_URL if it is not defined and "{_dev_redis_sock}" exists.
@ -52,18 +52,6 @@ if [ -S "${_dev_redis_sock}" ] && [ -z "${SEARXNG_REDIS_URL}" ]; then
export SEARXNG_REDIS_URL="unix://${_dev_redis_sock}?db=0"
fi
pylint.FILES() {
# List files tagged by comment:
#
# # lint: pylint
#
# These py files are linted by test.pylint()
grep -l -r --include \*.py '^#[[:blank:]]*lint:[[:blank:]]*pylint' searx searxng_extra tests
find . -name searxng.msg
}
YAMLLINT_FILES=()
while IFS= read -r line; do
YAMLLINT_FILES+=("$line")
@ -73,18 +61,9 @@ RST_FILES=(
'README.rst'
)
PYLINT_SEARXNG_DISABLE_OPTION="\
I,C,R,\
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
E1136"
PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="traits,supported_languages,language_aliases,logger,categories"
PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"
help() {
nvm.help
cat <<EOF
buildenv:
rebuild ./utils/brand.env
webapp.:
run : run developer instance
docs.:
@ -111,8 +90,6 @@ pyenv.:
uninstall : uninstall developer installation
cmd ... : run command ... in virtualenv
OK : test if virtualenv is OK
pypi.upload:
Upload python packages to PyPi (to test use pypi.upload.test)
format.:
python : format Python code source using black
pygments.:
@ -155,29 +132,6 @@ webapp.run() {
SEARXNG_DEBUG=1 pyenv.cmd python -m searx.webapp
}
buildenv() {
# settings file from repository's working tree are used by default
SEARXNG_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml"
if [ -f /etc/searx/settings.yml ]; then
err_msg "settings.yml in /etc/searx/ is deprecated, move file to folder /etc/searxng/"
fi
if [ -r '/etc/searxng/settings.yml' ]; then
if ask_yn "should settings read from: /etc/searxng/settings.yml"; then
SEARXNG_SETTINGS_PATH='/etc/searxng/settings.yml'
fi
fi
export SEARXNG_SETTINGS_PATH
(
set -e
SEARXNG_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \
| prefix_stdout "${_Blue}BUILDENV${_creset} "
)
return "${PIPESTATUS[0]}"
}
docker.push() {
docker.build push
}
@ -345,7 +299,6 @@ pyenv.install() {
pyenv
build_msg PYENV "[install] pip install -e 'searx${PY_SETUP_EXTRAS}'"
"${PY_ENV_BIN}/python" -m pip install -e ".${PY_SETUP_EXTRAS}"
buildenv
)
local exit_val=$?
if [ ! $exit_val -eq 0 ]; then
@ -360,31 +313,12 @@ pyenv.uninstall() {
}
pypi.upload() {
py.clean
py.build
# https://github.com/pypa/twine
pyenv.cmd twine upload "${PYDIST}"/*
}
pypi.upload.test() {
py.clean
py.build
pyenv.cmd twine upload -r testpypi "${PYDIST}"/*
}
format.python() {
build_msg TEST "[format.python] black \$BLACK_TARGETS"
pyenv.cmd black "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}"
dump_return $?
}
PYLINT_FILES=()
while IFS= read -r line; do
PYLINT_FILES+=("$line")
done <<< "$(pylint.FILES)"
# shellcheck disable=SC2119
main() {

View file

@ -1,6 +1,6 @@
{
"dependencies": {
"eslint": "^8.50.0",
"eslint": "^9.0.0",
"pyright": "^1.1.329"
},
"scripts": {

View file

@ -1,23 +1,22 @@
mock==5.1.0
nose2[coverage_plugin]==0.13.0
nose2[coverage_plugin]==0.14.1
cov-core==1.15.0
black==22.12.0
pylint==2.17.6
splinter==0.19.0
selenium==4.13.0
twine==4.0.2
Pallets-Sphinx-Themes==2.1.1
black==24.3.0
pylint==3.1.0
splinter==0.21.0
selenium==4.20.0
Pallets-Sphinx-Themes==2.1.2
Sphinx<=7.1.2; python_version == '3.8'
Sphinx==7.2.6; python_version > '3.8'
sphinx-issues==3.0.1
Sphinx==7.3.7; python_version > '3.8'
sphinx-issues==4.1.0
sphinx-jinja==2.0.2
sphinx-tabs==3.4.1
sphinx-tabs==3.4.5
sphinxcontrib-programoutput==0.17
sphinx-autobuild==2021.3.14
sphinx-notfound-page==1.0.0
myst-parser==2.0.0
linuxdoc==20230827
linuxdoc==20231020
aiounittest==1.4.2
yamllint==1.32.0
wlc==1.13
yamllint==1.35.1
wlc==1.14
coloredlogs==15.0.1

View file

@ -1,19 +1,18 @@
certifi==2023.7.22
babel==2.12.1
flask-babel==3.1.0
flask==2.3.3
jinja2==3.1.2
lxml==4.9.3
pygments==2.16.1
python-dateutil==2.8.2
certifi==2024.2.2
babel==2.14.0
flask-babel==4.0.0
flask==3.0.3
jinja2==3.1.3
lxml==5.2.1
pygments==2.17.2
python-dateutil==2.9.0.post0
pyyaml==6.0.1
httpx[http2]==0.24.1
Brotli==1.1.0
uvloop==0.17.0
uvloop==0.19.0
httpx-socks[asyncio]==0.7.7
setproctitle==1.3.2
redis==4.6.0
setproctitle==1.3.3
redis==5.0.4
markdown-it-py==3.0.0
typing_extensions==4.8.0
fasttext-predict==0.9.2.1
fasttext-predict==0.9.2.2
pytomlpp==1.0.13

View file

@ -1,6 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pylint: disable=missing-module-docstring
# pylint: disable=missing-module-docstring, cyclic-import
import sys
import os
@ -108,5 +107,6 @@ else:
if settings['server']['public_instance']:
logger.warning(
"Be aware you have activated features intended only for public instances. "
+ "This force the usage of the bot limiter and link_token plugins."
"This force the usage of the limiter and link_token / "
"see https://docs.searxng.org/admin/searx.limiter.html"
)

View file

@ -1,25 +1,30 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
import sys
from os import listdir
from os.path import realpath, dirname, join, isdir
from searx.utils import load_module
from collections import defaultdict
from searx.utils import load_module
answerers_dir = dirname(realpath(__file__))
def load_answerers():
answerers = []
answerers = [] # pylint: disable=redefined-outer-name
for filename in listdir(answerers_dir):
if not isdir(join(answerers_dir, filename)) or filename.startswith('_'):
continue
module = load_module('answerer.py', join(answerers_dir, filename))
if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not len(module.keywords):
exit(2)
if not hasattr(module, 'keywords') or not isinstance(module.keywords, tuple) or not module.keywords:
sys.exit(2)
answerers.append(module)
return answerers
def get_answerers_by_keywords(answerers):
def get_answerers_by_keywords(answerers): # pylint:disable=redefined-outer-name
by_keyword = defaultdict(list)
for answerer in answerers:
for keyword in answerer.keywords:

View file

@ -1,3 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
import hashlib
import random
import string

View file

@ -1,3 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
from functools import reduce
from operator import mul

View file

@ -1,12 +1,11 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module implements functions needed for the autocompleter.
"""
# pylint: disable=use-dict-literal
import json
from urllib.parse import urlencode
from urllib.parse import urlencode, quote_plus
import lxml
from httpx import HTTPError
@ -16,17 +15,26 @@ from searx.engines import (
engines,
google,
)
from searx.network import get as http_get
from searx.network import get as http_get, post as http_post
from searx.exceptions import SearxEngineResponseException
def get(*args, **kwargs):
def update_kwargs(**kwargs):
if 'timeout' not in kwargs:
kwargs['timeout'] = settings['outgoing']['request_timeout']
kwargs['raise_for_httperror'] = True
def get(*args, **kwargs):
update_kwargs(**kwargs)
return http_get(*args, **kwargs)
def post(*args, **kwargs):
update_kwargs(**kwargs)
return http_post(*args, **kwargs)
def brave(query, _lang):
# brave search autocompleter
url = 'https://search.brave.com/api/suggest?'
@ -145,6 +153,18 @@ def seznam(query, _lang):
]
def stract(query, _lang):
# stract autocompleter (beta)
url = f"https://stract.com/beta/api/autosuggest?q={quote_plus(query)}"
resp = post(url)
if not resp.ok:
return []
return [suggestion['raw'] for suggestion in resp.json()]
def startpage(query, sxng_locale):
"""Autocomplete from Startpage. Supports Startpage's languages"""
lui = engines['startpage'].traits.get_language(sxng_locale, 'english')
@ -223,6 +243,7 @@ backends = {
'mwmbl': mwmbl,
'seznam': seznam,
'startpage': startpage,
'stract': stract,
'swisscows': swisscows,
'qwant': qwant,
'wikipedia': wikipedia,

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module implements the :origin:`searxng_msg <babel.cfg>` extractor to
extract messages from:

View file

@ -1,44 +1,22 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection src:
The :ref:`limiter <limiter src>` implements several methods to block bots:
a. Analysis of the HTTP header in the request / can be easily bypassed.
b. Block and pass lists in which IPs are listed / difficult to maintain, since
the IPs of bots are not all known and change over the time.
c. Detection of bots based on the behavior of the requests and blocking and, if
necessary, unblocking of the IPs via a dynamically changeable IP block list.
For dynamically changeable IP lists a Redis database is needed and for any kind
of IP list the determination of the IP of the client is essential. The IP of
the client is determined via the X-Forwarded-For_ HTTP header
.. _X-Forwarded-For:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
X-Forwarded-For
===============
.. attention::
A correct setup of the HTTP request headers ``X-Forwarded-For`` and
``X-Real-IP`` is essential to be able to assign a request to an IP correctly:
- `NGINX RequestHeader`_
- `Apache RequestHeader`_
.. _NGINX RequestHeader:
https://docs.searxng.org/admin/installation-nginx.html#nginx-s-searxng-site
.. _Apache RequestHeader:
https://docs.searxng.org/admin/installation-apache.html#apache-s-searxng-site
.. autofunction:: searx.botdetection.get_real_ip
Implementations used for bot detection.
"""
from ._helpers import dump_request
from ._helpers import get_real_ip
from ._helpers import get_network
from ._helpers import too_many_requests
__all__ = ['dump_request', 'get_network', 'get_real_ip', 'too_many_requests']
redis_client = None
cfg = None
def init(_cfg, _redis_client):
global redis_client, cfg # pylint: disable=global-statement
redis_client = _redis_client
cfg = _cfg

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pylint: disable=missing-module-docstring, invalid-name
from __future__ import annotations
@ -13,8 +12,8 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from searx import logger
from . import config
logger = logger.getChild('botdetection')
@ -104,10 +103,10 @@ def get_real_ip(request: flask.Request) -> str:
if not forwarded_for:
_log_error_only_once("X-Forwarded-For header is not set!")
else:
from .limiter import get_cfg # pylint: disable=import-outside-toplevel, cyclic-import
from . import cfg # pylint: disable=import-outside-toplevel, cyclic-import
forwarded_for = [x.strip() for x in forwarded_for.split(',')]
x_for: int = get_cfg()['real_ip.x_for'] # type: ignore
x_for: int = cfg['real_ip.x_for'] # type: ignore
forwarded_for = forwarded_for[-min(len(forwarded_for), x_for)]
if not real_ip:

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Configuration class :py:class:`Config` with deep-update, schema validation
and deprecated names.
@ -211,7 +210,6 @@ def value(name: str, data_dict: dict):
def validate(
schema_dict: typing.Dict, data_dict: typing.Dict, deprecated: typing.Dict[str, str]
) -> typing.Tuple[bool, list]:
"""Deep validation of dictionary in ``data_dict`` against dictionary in
``schema_dict``. Argument deprecated is a dictionary that maps deprecated
configuration names to a messages::

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``http_accept``
----------------------
@ -24,7 +23,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from . import config
from ._helpers import too_many_requests

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``http_accept_encoding``
-------------------------------
@ -25,7 +24,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from . import config
from ._helpers import too_many_requests

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``http_accept_language``
-------------------------------
@ -21,7 +20,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from . import config
from ._helpers import too_many_requests

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``http_connection``
--------------------------
@ -22,7 +21,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from . import config
from ._helpers import too_many_requests

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``http_user_agent``
--------------------------
@ -24,7 +23,7 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from . import config
from ._helpers import too_many_requests
@ -35,7 +34,7 @@ USER_AGENT = (
+ r'|HttpClient|Jersey|Python|libwww-perl|Ruby|SynHttpClient|UniversalFeedParser|Googlebot|GoogleImageProxy'
+ r'|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot'
+ r'|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT|Sogou|Abonti|Pixray|Spinn3r|SemrushBot|Exabot'
+ r'|ZmEu|BLEXBot|bitlybot'
+ r'|ZmEu|BLEXBot|bitlybot|HeadlessChrome'
# unmaintained Farside instances
+ r'|'
+ re.escape(r'Mozilla/5.0 (compatible; Farside/0.1.0; +https://farside.link)')

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection.ip_limit:
Method ``ip_limit``
@ -13,8 +12,7 @@ and at least for a maximum of 10 minutes.
The :py:obj:`.link_token` method can be used to investigate whether a request is
*suspicious*. To activate the :py:obj:`.link_token` method in the
:py:obj:`.ip_limit` method add the following to your
``/etc/searxng/limiter.toml``:
:py:obj:`.ip_limit` method add the following configuration:
.. code:: toml
@ -46,13 +44,12 @@ from ipaddress import (
import flask
import werkzeug
from searx.tools import config
from searx import settings
from searx import redisdb
from searx.redislib import incr_sliding_window, drop_counter
from . import link_token
from . import config
from ._helpers import (
too_many_requests,
logger,
@ -110,7 +107,7 @@ def filter_request(
if c > API_MAX:
return too_many_requests(network, "too many request in API_WINDOW")
if settings['server']['public_instance'] or cfg['botdetection.ip_limit.link_token']:
if cfg['botdetection.ip_limit.link_token']:
suspicious = link_token.is_suspicious(network, request, True)

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _botdetection.ip_lists:
Method ``ip_lists``
@ -13,7 +12,7 @@ The ``ip_lists`` method implements IP :py:obj:`block- <block_ip>` and
[botdetection.ip_lists]
pass_ip = [
'140.238.172.132', # IPv4 of check.searx.space
'167.235.158.251', # IPv4 of check.searx.space
'192.168.0.0/16', # IPv4 private network
'fe80::/10' # IPv6 linklocal
]
@ -33,15 +32,15 @@ from ipaddress import (
IPv6Address,
)
from searx.tools import config
from . import config
from ._helpers import logger
logger = logger.getChild('ip_limit')
SEARXNG_ORG = [
# https://github.com/searxng/searxng/pull/2484#issuecomment-1576639195
'140.238.172.132', # IPv4 check.searx.space
'2603:c022:0:4900::/56', # IPv6 check.searx.space
'167.235.158.251', # IPv4 check.searx.space
'2a01:04f8:1c1c:8fc2::/64', # IPv6 check.searx.space
]
"""Passlist of IPs from the SearXNG organization, e.g. `check.searx.space`."""

View file

@ -1,145 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
""".. _limiter src:
Limiter
=======
.. sidebar:: info
The limiter requires a :ref:`Redis <settings redis>` database.
Bot protection / IP rate limitation. The intention of rate limitation is to
limit suspicious requests from an IP. The motivation behind this is the fact
that SearXNG passes through requests from bots and is thus classified as a bot
itself. As a result, the SearXNG engine then receives a CAPTCHA or is blocked
by the search engine (the origin) in some other way.
To avoid blocking, the requests from bots to SearXNG must also be blocked, this
is the task of the limiter. To perform this task, the limiter uses the methods
from the :py:obj:`searx.botdetection`.
To enable the limiter activate:
.. code:: yaml
server:
...
limiter: true # rate limit the number of request on the instance, block some bots
and set the redis-url connection. Check the value, it depends on your redis DB
(see :ref:`settings redis`), by example:
.. code:: yaml
redis:
url: unix:///usr/local/searxng-redis/run/redis.sock?db=0
"""
from __future__ import annotations
from pathlib import Path
from ipaddress import ip_address
import flask
import werkzeug
from searx.tools import config
from searx import logger
from . import (
http_accept,
http_accept_encoding,
http_accept_language,
http_user_agent,
ip_limit,
ip_lists,
)
from ._helpers import (
get_network,
get_real_ip,
dump_request,
)
logger = logger.getChild('botdetection.limiter')
CFG: config.Config = None # type: ignore
LIMITER_CFG_SCHEMA = Path(__file__).parent / "limiter.toml"
"""Base configuration (schema) of the botdetection."""
LIMITER_CFG = Path('/etc/searxng/limiter.toml')
"""Local Limiter configuration."""
CFG_DEPRECATED = {
# "dummy.old.foo": "config 'dummy.old.foo' exists only for tests. Don't use it in your real project config."
}
def get_cfg() -> config.Config:
global CFG # pylint: disable=global-statement
if CFG is None:
CFG = config.Config.from_toml(LIMITER_CFG_SCHEMA, LIMITER_CFG, CFG_DEPRECATED)
return CFG
def filter_request(request: flask.Request) -> werkzeug.Response | None:
# pylint: disable=too-many-return-statements
cfg = get_cfg()
real_ip = ip_address(get_real_ip(request))
network = get_network(real_ip, cfg)
if request.path == '/healthz':
return None
# link-local
if network.is_link_local:
return None
# block- & pass- lists
#
# 1. The IP of the request is first checked against the pass-list; if the IP
# matches an entry in the list, the request is not blocked.
# 2. If no matching entry is found in the pass-list, then a check is made against
# the block list; if the IP matches an entry in the list, the request is
# blocked.
# 3. If the IP is not in either list, the request is not blocked.
match, msg = ip_lists.pass_ip(real_ip, cfg)
if match:
logger.warning("PASS %s: matched PASSLIST - %s", network.compressed, msg)
return None
match, msg = ip_lists.block_ip(real_ip, cfg)
if match:
logger.error("BLOCK %s: matched BLOCKLIST - %s", network.compressed, msg)
return flask.make_response(('IP is on BLOCKLIST - %s' % msg, 429))
# methods applied on /
for func in [
http_user_agent,
]:
val = func.filter_request(network, request, cfg)
if val is not None:
return val
# methods applied on /search
if request.path == '/search':
for func in [
http_accept,
http_accept_encoding,
http_accept_language,
http_user_agent,
ip_limit,
]:
val = func.filter_request(network, request, cfg)
if val is not None:
return val
logger.debug(f"OK {network}: %s", dump_request(flask.request))
return None

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Method ``link_token``
---------------------
@ -99,15 +98,13 @@ def ping(request: flask.Request, token: str):
The expire time of this ping-key is :py:obj:`PING_LIVE_TIME`.
"""
from . import limiter # pylint: disable=import-outside-toplevel, cyclic-import
from . import redis_client, cfg # pylint: disable=import-outside-toplevel, cyclic-import
redis_client = redisdb.client()
if not redis_client:
return
if not token_is_valid(token):
return
cfg = limiter.get_cfg()
real_ip = ip_address(get_real_ip(request))
network = get_network(real_ip, cfg)

View file

@ -1,73 +0,0 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pyright: basic
"""Module for backward compatibility.
"""
# pylint: disable=C,R
__all__ = ('cached_property',)
try:
from functools import cached_property # type: ignore
except ImportError:
# cache_property has been added in py3.8 [1]
#
# To support cache_property in py3.7 the implementation from 3.8 has been
# copied here. This code can be cleanup with EOL of py3.7.
#
# [1] https://docs.python.org/3/library/functools.html#functools.cached_property
from threading import RLock
_NOT_FOUND = object()
class cached_property:
def __init__(self, func):
self.func = func
self.attrname = None
self.__doc__ = func.__doc__
self.lock = RLock()
def __set_name__(self, owner, name):
if self.attrname is None:
self.attrname = name
elif name != self.attrname:
raise TypeError(
"Cannot assign the same cached_property to two different names "
f"({self.attrname!r} and {name!r})."
)
def __get__(self, instance, owner=None):
if instance is None:
return self
if self.attrname is None:
raise TypeError("Cannot use cached_property instance without calling __set_name__ on it.")
try:
cache = instance.__dict__
except AttributeError: # not all objects have __dict__ (e.g. class defines slots)
msg = (
f"No '__dict__' attribute on {type(instance).__name__!r} "
f"instance to cache {self.attrname!r} property."
)
raise TypeError(msg) from None
val = cache.get(self.attrname, _NOT_FOUND)
if val is _NOT_FOUND:
with self.lock:
# check if another thread filled cache while we awaited lock
val = cache.get(self.attrname, _NOT_FOUND)
if val is _NOT_FOUND:
val = self.func(instance)
try:
cache[self.attrname] = val
except TypeError:
msg = (
f"The '__dict__' attribute on {type(instance).__name__!r} instance "
f"does not support item assignment for caching {self.attrname!r} property."
)
raise TypeError(msg) from None
return val

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This module holds the *data* created by::
make data.all
@ -15,6 +14,7 @@ __all__ = [
'EXTERNAL_BANGS',
'OSM_KEYS_TAGS',
'ENGINE_DESCRIPTIONS',
'LOCALES',
'ahmia_blacklist_loader',
]
@ -50,3 +50,4 @@ EXTERNAL_BANGS = _load('external_bangs.json')
OSM_KEYS_TAGS = _load('osm_keys_tags.json')
ENGINE_DESCRIPTIONS = _load('engine_descriptions.json')
ENGINE_TRAITS = _load('engine_traits.json')
LOCALES = _load('locales.json')

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

69
searx/data/locales.json Normal file
View file

@ -0,0 +1,69 @@
{
"LOCALE_NAMES": {
"af": "Afrikaans",
"ar": "العربية (Arabic)",
"bg": "Български (Bulgarian)",
"bn": "বাংলা (Bangla)",
"bo": "བོད་སྐད་ (Tibetan)",
"ca": "Català (Catalan)",
"cs": "Čeština (Czech)",
"cy": "Cymraeg (Welsh)",
"da": "Dansk (Danish)",
"de": "Deutsch (German)",
"dv": "ދިވެހި (Dhivehi)",
"el-GR": "Ελληνικά, Ελλάδα (Greek, Greece)",
"en": "English",
"eo": "Esperanto",
"es": "Español (Spanish)",
"et": "Eesti (Estonian)",
"eu": "Euskara (Basque)",
"fa-IR": "فارسی, ایران (Persian, Iran)",
"fi": "Suomi (Finnish)",
"fil": "Filipino",
"fr": "Français (French)",
"gl": "Galego (Galician)",
"he": "עברית (Hebrew)",
"hr": "Hrvatski (Croatian)",
"hu": "Magyar (Hungarian)",
"ia": "Interlingua",
"id": "Indonesia (Indonesian)",
"it": "Italiano (Italian)",
"ja": "日本語 (Japanese)",
"ko": "한국어 (Korean)",
"lt": "Lietuvių (Lithuanian)",
"lv": "Latviešu (Latvian)",
"ml": "മലയാളം (Malayalam)",
"ms": "Melayu (Malay)",
"nb-NO": "Norsk bokmål, Norge (Norwegian bokmål, Norway)",
"nl": "Nederlands (Dutch)",
"nl-BE": "Nederlands, België (Dutch, Belgium)",
"oc": "Occitan",
"pa": "ਪੰਜਾਬੀ (Punjabi)",
"pap": "Papiamento",
"pl": "Polski (Polish)",
"pt": "Português (Portuguese)",
"pt-BR": "Português, Brasil (Portuguese, Brazil)",
"ro": "Română (Romanian)",
"ru": "Русский (Russian)",
"si": "සිංහල (Sinhala)",
"sk": "Slovenčina (Slovak)",
"sl": "Slovenščina (Slovenian)",
"sr": "Српски (Serbian)",
"sv": "Svenska (Swedish)",
"szl": "Ślōnski (Silesian)",
"ta": "தமிழ் (Tamil)",
"te": "తెలుగు (Telugu)",
"th": "ไทย (Thai)",
"tr": "Türkçe (Turkish)",
"uk": "Українська (Ukrainian)",
"vi": "Tiếng việt (Vietnamese)",
"zh-HK": "中文, 中國香港特別行政區 (Chinese, Hong Kong SAR China)",
"zh-Hans-CN": "中文, 中国 (Chinese, China)",
"zh-Hant-TW": "中文, 台灣 (Chinese, Taiwan)"
},
"RTL_LOCALES": [
"ar",
"fa-IR",
"he"
]
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,11 @@
{
"versions": [
"118.0",
"117.0"
],
"os": [
"Windows NT 10.0; Win64; x64",
"X11; Linux x86_64"
],
"ua": "Mozilla/5.0 ({os}; rv:109.0) Gecko/20100101 Firefox/{version}"
"ua": "Mozilla/5.0 ({os}; rv:{version}) Gecko/20100101 Firefox/{version}",
"versions": [
"124.0",
"123.0"
]
}

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Implementations of the framework for the SearXNG engines.
.. hint::

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Engine's traits are fetched from the origin engines and stored in a JSON file
in the *data folder*. Most often traits are languages and region codes and
their mapping from SearXNG's representation to the representation in the origin
@ -14,8 +13,7 @@ from __future__ import annotations
import json
import dataclasses
import types
from typing import Dict, Iterable, Union, Callable, Optional, TYPE_CHECKING
from typing_extensions import Literal, Self
from typing import Dict, Literal, Iterable, Union, Callable, Optional, TYPE_CHECKING
from searx import locales
from searx.data import data_dir, ENGINE_TRAITS
@ -136,7 +134,7 @@ class EngineTraits:
return EngineTraits(**dataclasses.asdict(self))
@classmethod
def fetch_traits(cls, engine: Engine) -> Union[Self, None]:
def fetch_traits(cls, engine: Engine) -> Union['EngineTraits', None]:
"""Call a function ``fetch_traits(engine_traits)`` from engines namespace to fetch
and set properties from the origin engine in the object ``engine_traits``. If
function does not exists, ``None`` is returned.
@ -168,7 +166,7 @@ class EngineTraits:
# - name: google italian
# engine: google
# language: it
# region: it-IT
# region: it-IT # type: ignore
traits = self.copy()
@ -204,7 +202,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):
json.dump(self, f, indent=2, sort_keys=True, cls=EngineTraitsEncoder)
@classmethod
def from_data(cls) -> Self:
def from_data(cls) -> 'EngineTraitsMap':
"""Instantiate :class:`EngineTraitsMap` object from :py:obj:`ENGINE_TRAITS`"""
obj = cls()
for k, v in ENGINE_TRAITS.items():
@ -212,7 +210,7 @@ class EngineTraitsMap(Dict[str, EngineTraits]):
return obj
@classmethod
def fetch_traits(cls, log: Callable) -> Self:
def fetch_traits(cls, log: Callable) -> 'EngineTraitsMap':
from searx import engines # pylint: disable=cyclic-import, import-outside-toplevel
names = list(engines.engines)

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
1337x
# pylint: disable=invalid-name
"""1337x
"""
from urllib.parse import quote, urljoin

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pylint: disable=invalid-name
"""9GAG (social media)"""

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Load and initialize the ``engines``, see :py:func:`load_engines` and register
:py:obj:`engine_shortcuts`.
@ -45,6 +44,7 @@ ENGINE_DEFAULT_ARGS = {
"using_tor_proxy": False,
"send_accept_language_header": False,
"tokens": [],
"max_page": 0,
}
# set automatically when an engine does not have any tab category
DEFAULT_CATEGORY = 'other'

View file

@ -74,7 +74,7 @@ def response(resp):
if number_of_results:
try:
results.append({'number_of_results': int(extract_text(number_of_results))})
except:
except: # pylint: disable=bare-except
pass
return results

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""`Anna's Archive`_ is a free non-profit online shadow library metasearch
engine providing access to a variety of book resources (also via IPFS), created
by a team of anonymous archivists (AnnaArchivist_).
@ -25,7 +24,7 @@ for *newest* articles and journals (PDF) / by shortcut ``!aaa <search-term>``.
- name: annas articles
engine: annas_archive
shortcut: aaa
aa_content: 'journal_article'
aa_content: 'magazine'
aa_ext: 'pdf'
aa_sort: 'newest'
@ -61,7 +60,7 @@ base_url: str = "https://annas-archive.org"
aa_content: str = ""
"""Anan's search form field **Content** / possible values::
journal_article, book_any, book_fiction, book_unknown, book_nonfiction,
book_fiction, book_unknown, book_nonfiction,
book_comic, magazine, standards_document
To not filter use an empty string (default).

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""APKMirror
"""

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Apple App Store
"""Apple App Store
"""
from json import loads

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Apple Maps"""
from json import loads

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""
Arch Linux Wiki
~~~~~~~~~~~~~~~

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""The Art Institute of Chicago
Explore thousands of artworks from The Art Institute of Chicago.
@ -57,11 +56,10 @@ def response(resp):
results.append(
{
'url': 'https://artic.edu/artworks/%(id)s' % result,
'title': result['title'] + " (%(date_display)s) // %(artist_display)s" % result,
'content': result['medium_display'],
'title': result['title'] + " (%(date_display)s) // %(artist_display)s" % result,
'content': "%(medium_display)s // %(dimensions)s" % result,
'author': ', '.join(result['artist_titles']),
'img_src': image_api + '/%(image_id)s/full/843,/0/default.jpg' % result,
'img_format': result['dimensions'],
'template': 'images.html',
}
)

View file

@ -1,11 +1,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""ArXiV (Scientific preprints)
"""
ArXiV (Scientific preprints)
"""
from datetime import datetime
from lxml import etree
from lxml.etree import XPath
from datetime import datetime
from searx.utils import eval_xpath, eval_xpath_list, eval_xpath_getindex
# about
@ -50,7 +51,7 @@ def request(query, params):
# basic search
offset = (params['pageno'] - 1) * number_of_results
string_args = dict(query=query, offset=offset, number_of_results=number_of_results)
string_args = {'query': query, 'offset': offset, 'number_of_results': number_of_results}
params['url'] = base_url.format(**string_args)

74
searx/engines/ask.py Normal file
View file

@ -0,0 +1,74 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Ask.com"""
from urllib.parse import urlencode
import dateutil
from lxml import html
from searx import utils
# Metadata
about = {
"website": "https://www.ask.com/",
"wikidata_id": 'Q847564',
"official_api_documentation": None,
"use_official_api": False,
"require_api_key": False,
"results": "HTML",
}
# Engine Configuration
categories = ['general']
paging = True
max_page = 5
# Base URL
base_url = "https://www.ask.com/web"
def request(query, params):
query_params = {
"q": query,
"page": params["pageno"],
}
params["url"] = f"{base_url}?{urlencode(query_params)}"
return params
def response(resp):
start_tag = 'window.MESON.initialState = {'
end_tag = '}};'
dom = html.fromstring(resp.text)
script = utils.eval_xpath_getindex(dom, '//script', 0, default=None).text
pos = script.index(start_tag) + len(start_tag) - 1
script = script[pos:]
pos = script.index(end_tag) + len(end_tag) - 1
script = script[:pos]
json_resp = utils.js_variable_to_python(script)
results = []
for item in json_resp['search']['webResults']['results']:
pubdate_original = item.get('pubdate_original')
if pubdate_original:
pubdate_original = dateutil.parser.parse(pubdate_original)
metadata = [item.get(field) for field in ['category_l1', 'catsy'] if item.get(field)]
results.append(
{
"url": item['url'].split('&ueid')[0],
"title": item['title'],
"content": item['abstract'],
"publishedDate": pubdate_original,
# "img_src": item.get('image_url') or None, # these are not thumbs / to large
"metadata": ' | '.join(metadata),
}
)
return results

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Bandcamp (Music)
@website https://bandcamp.com/
@ -38,16 +37,6 @@ iframe_src = "https://bandcamp.com/EmbeddedPlayer/{type}={result_id}/size=large/
def request(query, params):
'''pre-request callback
params<dict>:
method : POST/GET
headers : {}
data : {} # if method == POST
url : ''
category: 'search category'
pageno : 1 # number of the requested page
'''
search_path = search_string.format(query=urlencode({'q': query}), page=params['pageno'])
params['url'] = base_url + search_path
@ -55,10 +44,7 @@ def request(query, params):
def response(resp):
'''post-response callback
resp: requests response object
'''
results = []
dom = html.fromstring(resp.text)

View file

@ -1,12 +1,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""BASE (Scholar publications)
"""
BASE (Scholar publications)
"""
from datetime import datetime
import re
from urllib.parse import urlencode
from lxml import etree
from datetime import datetime
import re
from searx.utils import searx_useragent
# about
@ -55,13 +55,17 @@ shorcut_dict = {
def request(query, params):
# replace shortcuts with API advanced search keywords
for key in shorcut_dict.keys():
query = re.sub(key, shorcut_dict[key], query)
for key, val in shorcut_dict.items():
query = re.sub(key, val, query)
# basic search
offset = (params['pageno'] - 1) * number_of_results
string_args = dict(query=urlencode({'query': query}), offset=offset, hits=number_of_results)
string_args = {
'query': urlencode({'query': query}),
'offset': offset,
'hits': number_of_results,
}
params['url'] = base_url.format(**string_args)
@ -99,7 +103,7 @@ def response(resp):
try:
publishedDate = datetime.strptime(date, date_format)
break
except:
except: # pylint: disable=bare-except
pass
if publishedDate is not None:

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Bilibili is a Chinese video sharing website.
.. _Bilibili: https://www.bilibili.com

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""This is the implementation of the Bing-WEB engine. Some of this
implementations are shared by other engines:
@ -59,6 +58,9 @@ about = {
# engine dependent config
categories = ['general', 'web']
paging = True
max_page = 200
"""200 pages maximum (``&first=1991``)"""
time_range_support = True
safesearch = True
"""Bing results are always SFW. To get NSFW links from bing some age

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Bing-Images: description see :py:obj:`searx.engines.bing`.
"""
# pylint: disable=invalid-name
@ -92,7 +91,7 @@ def response(resp):
metadata = json.loads(result.xpath('.//a[@class="iusc"]/@m')[0])
title = ' '.join(result.xpath('.//div[@class="infnmpt"]//a/text()')).strip()
img_format = ' '.join(result.xpath('.//div[@class="imgpt"]/div/span/text()')).strip()
img_format = ' '.join(result.xpath('.//div[@class="imgpt"]/div/span/text()')).strip().split(" · ")
source = ' '.join(result.xpath('.//div[@class="imgpt"]//div[@class="lnkw"]//a/text()')).strip()
results.append(
{
@ -103,7 +102,8 @@ def response(resp):
'content': metadata['desc'],
'title': title,
'source': source,
'img_format': img_format,
'resolution': img_format[0],
'img_format': img_format[1] if len(img_format) >= 2 else None,
}
)
return results

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Bing-News: description see :py:obj:`searx.engines.bing`.
.. hint::

View file

@ -1,8 +1,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
# pylint: disable=invalid-name
"""Bing-Videos: description see :py:obj:`searx.engines.bing`.
"""
# pylint: disable=invalid-name
from typing import TYPE_CHECKING
import json

67
searx/engines/bpb.py Normal file
View file

@ -0,0 +1,67 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""BPB refers to ``Bundeszentrale für poltische Bildung``, which is a German
governmental institution aiming to reduce misinformation by providing resources
about politics and history.
"""
from datetime import datetime
from urllib.parse import urlencode
about = {
'website': "https://www.bpb.de",
'official_api_documentation': None,
'use_official_api': False,
'require_api_key': False,
'results': 'JSON',
'language': 'de',
}
paging = True
categories = ['general']
base_url = "https://www.bpb.de"
def request(query, params):
args = {
'query[term]': query,
'page': params['pageno'] - 1,
'sort[direction]': 'descending',
'payload[nid]': 65350,
}
params['url'] = f"{base_url}/bpbapi/filter/search?{urlencode(args)}"
return params
def response(resp):
results = []
json_resp = resp.json()
for result in json_resp['teaser']:
img_src = None
if result['teaser']['image']:
img_src = base_url + result['teaser']['image']['sources'][-1]['url']
metadata = result['extension']['overline']
authors = ', '.join(author['name'] for author in result['extension'].get('authors', []))
if authors:
metadata += f" | {authors}"
publishedDate = None
if result['extension'].get('publishingDate'):
publishedDate = datetime.utcfromtimestamp(result['extension']['publishingDate'])
results.append(
{
'url': base_url + result['teaser']['link']['url'],
'title': result['teaser']['title'],
'content': result['teaser']['text'],
'img_src': img_src,
'publishedDate': publishedDate,
'metadata': metadata,
}
)
return results

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Brave supports the categories listed in :py:obj:`brave_category` (General,
news, videos, images). The support of :py:obj:`paging` and :py:obj:`time range
<time_range_support>` is limited (see remarks).
@ -30,6 +29,13 @@ Configured ``brave`` engines:
...
brave_category: news
- name: brave.goggles
brave_category: goggles
time_range_support: true
paging: true
...
brave_category: goggles
.. _brave regions:
@ -58,6 +64,23 @@ region are mapped to regions in SearXNG (see :py:obj:`babel
low quality.
.. _brave googles:
Brave Goggles
=============
.. _list of Goggles: https://search.brave.com/goggles/discover
.. _Goggles Whitepaper: https://brave.com/static-assets/files/goggles.pdf
.. _Goggles Quickstart: https://github.com/brave/goggles-quickstart
Goggles allow you to choose, alter, or extend the ranking of Brave Search
results (`Goggles Whitepaper`_). Goggles are openly developed by the community
of Brave Search users.
Select from the `list of Goggles`_ people have published, or create your own
(`Goggles Quickstart`_).
.. _brave languages:
Brave languages
@ -95,7 +118,7 @@ Implementations
"""
from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING
from urllib.parse import (
urlencode,
@ -103,11 +126,13 @@ from urllib.parse import (
parse_qs,
)
from dateutil import parser
from lxml import html
from searx import locales
from searx.utils import (
extract_text,
eval_xpath,
eval_xpath_list,
eval_xpath_getindex,
js_variable_to_python,
@ -133,12 +158,14 @@ about = {
base_url = "https://search.brave.com/"
categories = []
brave_category = 'search'
"""Brave supports common web-search, video search, image and video search.
Goggles = Any
"""Brave supports common web-search, videos, images, news, and goggles search.
- ``search``: Common WEB search
- ``videos``: search for videos
- ``images``: search for images
- ``news``: search for news
- ``goggles``: Common WEB search with custom rules
"""
brave_spellcheck = False
@ -151,14 +178,18 @@ in SearXNG, the spellchecking is disabled by default.
send_accept_language_header = True
paging = False
"""Brave only supports paging in :py:obj:`brave_category` ``search`` (UI
category All)."""
category All) and in the goggles category."""
max_page = 10
"""Tested 9 pages maximum (``&offset=8``), to be save max is set to 10. Trying
to do more won't return any result and you will most likely be flagged as a bot.
"""
safesearch = True
safesearch_map = {2: 'strict', 1: 'moderate', 0: 'off'} # cookie: safesearch=off
time_range_support = False
"""Brave only supports time-range in :py:obj:`brave_category` ``search`` (UI
category All)."""
category All) and in the goggles category."""
time_range_map = {
'day': 'pd',
@ -179,12 +210,15 @@ def request(query, params):
if brave_spellcheck:
args['spellcheck'] = '1'
if brave_category == 'search':
if brave_category in ('search', 'goggles'):
if params.get('pageno', 1) - 1:
args['offset'] = params.get('pageno', 1) - 1
if time_range_map.get(params['time_range']):
args['tf'] = time_range_map.get(params['time_range'])
if brave_category == 'goggles':
args['goggles_id'] = Goggles
params["url"] = f"{base_url}{brave_category}?{urlencode(args)}"
# set properties in the cookies
@ -203,9 +237,19 @@ def request(query, params):
logger.debug("cookies %s", params['cookies'])
def _extract_published_date(published_date_raw):
if published_date_raw is None:
return None
try:
return parser.parse(published_date_raw)
except parser.ParserError:
return None
def response(resp):
if brave_category == 'search':
if brave_category in ('search', 'goggles'):
return _parse_search(resp)
datastr = ""
@ -244,17 +288,21 @@ def _parse_search(resp):
for result in eval_xpath_list(dom, xpath_results):
url = eval_xpath_getindex(result, './/a[contains(@class, "h")]/@href', 0, default=None)
title_tag = eval_xpath_getindex(result, './/div[contains(@class, "title")]', 0, default=None)
title_tag = eval_xpath_getindex(
result, './/a[contains(@class, "h")]//div[contains(@class, "title")]', 0, default=None
)
if url is None or title_tag is None or not urlparse(url).netloc: # partial url likely means it's an ad
continue
content_tag = eval_xpath_getindex(result, './/div[@class="snippet-description"]', 0, default='')
content_tag = eval_xpath_getindex(result, './/div[contains(@class, "snippet-description")]', 0, default='')
pub_date_raw = eval_xpath(result, 'substring-before(.//div[contains(@class, "snippet-description")], "-")')
img_src = eval_xpath_getindex(result, './/img[contains(@class, "thumb")]/@src', 0, default='')
item = {
'url': url,
'title': extract_text(title_tag),
'content': extract_text(content_tag),
'publishedDate': _extract_published_date(pub_date_raw),
'img_src': img_src,
}
@ -271,6 +319,10 @@ def _parse_search(resp):
item['iframe_src'] = iframe_src
item['template'] = 'videos.html'
item['thumbnail'] = eval_xpath_getindex(video_tag, './/img/@src', 0, default='')
pub_date_raw = extract_text(
eval_xpath(video_tag, './/div[contains(@class, "snippet-attributes")]/div/text()')
)
item['publishedDate'] = _extract_published_date(pub_date_raw)
else:
item['img_src'] = eval_xpath_getindex(video_tag, './/img/@src', 0, default='')
@ -296,6 +348,7 @@ def _parse_news(json_resp):
'url': result['url'],
'title': result['title'],
'content': result['description'],
'publishedDate': _extract_published_date(result['age']),
}
if result['thumbnail'] is not None:
item['img_src'] = result['thumbnail']['src']
@ -313,9 +366,10 @@ def _parse_images(json_resp):
'title': result['title'],
'content': result['description'],
'template': 'images.html',
'img_format': result['properties']['format'],
'resolution': result['properties']['format'],
'source': result['source'],
'img_src': result['properties']['url'],
'thumbnail_src': result['thumbnail']['src'],
}
result_list.append(item)
@ -335,6 +389,7 @@ def _parse_videos(json_resp):
'template': 'videos.html',
'length': result['video']['duration'],
'duration': result['video']['duration'],
'publishedDate': _extract_published_date(result['age']),
}
if result['thumbnail'] is not None:

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""BT4G_ (bt4g.com) is not a tracker and doesn't store any content and only
collects torrent metadata (such as file names and file sizes) and a magnet link
(torrent identifier).

View file

@ -3,8 +3,9 @@
BTDigg (Videos, Music, Files)
"""
from lxml import html
from urllib.parse import quote, urljoin
from lxml import html
from searx.utils import extract_text, get_torrent_size
# about
@ -67,7 +68,7 @@ def response(resp):
# convert files to int if possible
try:
files = int(files)
except:
except: # pylint: disable=bare-except
files = None
magnetlink = result.xpath('.//div[@class="torrent_magnet"]//a')[0].attrib['href']

View file

@ -0,0 +1,54 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""media.ccc.de"""
import datetime
from urllib.parse import urlencode
from dateutil import parser
about = {
'website': 'https://media.ccc.de',
'official_api_documentation': 'https://github.com/voc/voctoweb',
'use_official_api': True,
'require_api_key': False,
'results': 'JSON',
}
categories = ['videos']
paging = True
api_url = "https://api.media.ccc.de"
def request(query, params):
args = {'q': query, 'page': params['pageno']}
params['url'] = f"{api_url}/public/events/search?{urlencode(args)}"
return params
def response(resp):
results = []
for item in resp.json()['events']:
publishedDate = None
if item.get('date'):
publishedDate = parser.parse(item['date'])
iframe_src = None
if len(item['recordings']) > 0:
iframe_src = item['recordings'][0]['recording_url']
results.append(
{
'template': 'videos.html',
'url': item['frontend_link'],
'title': item['title'],
'content': item['description'],
'thumbnail': item['thumb_url'],
'publishedDate': publishedDate,
'length': datetime.timedelta(seconds=item['length']),
'iframe_src': iframe_src,
}
)
return results

View file

@ -1,5 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Chefkoch is a German database of recipes.
"""

Some files were not shown because too many files have changed in this diff Show more