Commit graph

4061 commits

Author SHA1 Message Date
Markus Heiser
8df1f0c47e [mod] add 'Accept-Language' HTTP header to online processores
Most engines that support languages (and regions) use the Accept-Language from
the WEB browser to build a response that fits to the language (and region).

- add new engine option: send_accept_language_header

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-01 17:01:59 +02:00
Markus Heiser
a2badb4fe4 [doc] add description of method EngineProcessor.get_params()
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-01 16:42:33 +02:00
Alexandre Flament
2babf59adc [fix] pyright repported errors
The errors make pyright usage useless since a new error won't be seen [1].

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

```
  searx/compat.py:11:27 - error: Expression of type "Type[cached_property[_T@cached_property]]" cannot be assigned to declared type "Type[cached_property]"
    "Type[cached_property[_T@cached_property]]" is incompatible with "Type[cached_property]"
    Type "Type[cached_property[_T@cached_property]]" cannot be assigned to type "Type[cached_property]" (reportGeneralTypeIssues)
  searx/utils.py:69:36 - error: Expression of type "None" cannot be assigned to parameter of type "str"
    Type "None" cannot be assigned to type "str" (reportGeneralTypeIssues)
  searx/utils.py:573:85 - error: Expression of type "None" cannot be assigned to parameter of type "int"
    Type "None" cannot be assigned to type "int" (reportGeneralTypeIssues)
  searx/webapp.py:1306:22 - error: Argument of type "str" cannot be assigned to parameter "__a" of type "BytesPath" in function "join"
    Type "str" cannot be assigned to type "BytesPath"
      "str" is incompatible with "bytes"
      "str" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:68 - error: Argument of type "Literal['themes']" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "Literal['themes']" cannot be assigned to type "BytesPath"
      "Literal['themes']" is incompatible with "bytes"
      "Literal['themes']" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:78 - error: Argument of type "str | Any | None" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "str | Any | None" cannot be assigned to type "BytesPath"
      Type "str" cannot be assigned to type "BytesPath"
        "str" is incompatible with "bytes"
        "str" is incompatible with protocol "PathLike[bytes]"
          "__fspath__" is not present (reportGeneralTypeIssues)
  searx/webapp.py:1306:85 - error: Argument of type "Literal['img']" cannot be assigned to parameter "paths" of type "BytesPath" in function "join"
    Type "Literal['img']" cannot be assigned to type "BytesPath"
      "Literal['img']" is incompatible with "bytes"
      "Literal['img']" is incompatible with protocol "PathLike[bytes]"
        "__fspath__" is not present (reportGeneralTypeIssues)
  searx/engines/mongodb.py:8:6 - warning: Import "pymongo" could not be resolved (reportMissingImports)
  searx/engines/mysql_server.py:9:8 - warning: Import "mysql.connector" could not be resolved (reportMissingImports)
  searx/engines/postgresql.py:9:8 - warning: Import "psycopg2" could not be resolved from source (reportMissingModuleSource)
  searx/engines/xpath.py:187:28 - warning: "categories" is not defined (reportUndefinedVariable)
  searx/search/__init__.py:184:82 - warning: "flask" is not defined (reportUndefinedVariable)
  searx/search/checker/background.py:19:26 - error: Type of "schedule" is partially unknown
    Type of "schedule" is "(delay: Any, func: Any, *args: Any) -> Literal[True]" (reportUnknownVariableType)
  searx/shared/__init__.py:8:12 - warning: Import "uwsgi" could not be resolved (reportMissingImports)
  searx/shared/shared_uwsgi.py:5:8 - warning: Import "uwsgi" could not be resolved (reportMissingImports)
```
2022-07-30 18:04:44 +02:00
Markus Heiser
782f73540e [utils/searxng.sh] implement new script to install SearXNG
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-30 13:39:35 +02:00
searxng-bot
953aaec6a3 [translations] update from Weblate
c0c9107c - 2022-07-27 - Sangha Lee <totoriato@gmail.com>
5b48bce6 - 2022-07-24 - Linerly <linerly@protonmail.com>
79669e65 - 2022-07-29 - Markus Heiser <markus.heiser@darmarit.de>
520e9284 - 2022-07-25 - Markus Heiser <markus.heiser@darmarit.de>
7cf52ff5 - 2022-07-25 - Markus Heiser <markus.heiser@darmarit.de>
9d3ebe72 - 2022-07-24 - Markus Heiser <markus.heiser@darmarit.de>
2d03c097 - 2022-07-24 - Markus Heiser <markus.heiser@darmarit.de>
388af012 - 2022-07-27 - Markus Heiser <markus.heiser@darmarit.de>
a4bcf098 - 2022-07-25 - Miguel Silva <miguelcabeca.dev@gmail.com>
93fd0b72 - 2022-07-27 - Markus Heiser <markus.heiser@darmarit.de>
8f68b206 - 2022-07-26 - tents <remendne@pentrens.jp>
9007c99c - 2022-07-24 - Markus Heiser <markus.heiser@darmarit.de>
aeec96f2 - 2022-07-26 - Matija Kromar <matija.kromar@gmail.com>
69084863 - 2022-07-25 - Markus Heiser <markus.heiser@darmarit.de>
b48190ab - 2022-07-24 - alexfs2015 <alex04fs@gmail.com>
b6bbc0a5 - 2022-07-23 - Markus Heiser <markus.heiser@darmarit.de>
1a503806 - 2022-07-29 - Markus Heiser <markus.heiser@darmarit.de>
c960cb93 - 2022-07-27 - Markus Heiser <markus.heiser@darmarit.de>
8a2bd34b - 2022-07-25 - Markus Heiser <markus.heiser@darmarit.de>
1064cea0 - 2022-07-23 - LagManCZ <lagmen@post.cz>
67423045 - 2022-07-24 - alexfs2015 <alex04fs@gmail.com>
56c87fda - 2022-07-24 - Markus Heiser <markus.heiser@darmarit.de>
36a64f1c - 2022-07-24 - Ankit Gupta <guptaa.ankitt@gmail.com>
2022-07-29 07:17:55 +00:00
Markus Heiser
14085cc0a7
Merge pull request #1580 from searxng/update_data_update_engine_descriptions.py
Update searx.data - update_engine_descriptions.py
2022-07-29 07:23:02 +02:00
Markus Heiser
7602c23d71
Merge pull request #1579 from searxng/update_data_update_currencies.py
Update searx.data - update_currencies.py
2022-07-29 07:22:12 +02:00
Markus Heiser
0bad4fb931
Merge pull request #1578 from searxng/update_data_update_firefox_version.py
Update searx.data - update_firefox_version.py
2022-07-29 07:21:06 +02:00
Markus Heiser
7dd75ae080
Merge pull request #1576 from searxng/update_data_update_languages.py
Update searx.data - update_languages.py
2022-07-29 07:20:28 +02:00
dalf
2bdb367e8c Update searx.data - update_engine_descriptions.py 2022-07-29 02:13:07 +00:00
dalf
fc019fb296 Update searx.data - update_currencies.py 2022-07-29 02:01:30 +00:00
dalf
c2662ec3c8 Update searx.data - update_firefox_version.py 2022-07-29 02:01:08 +00:00
dalf
385542e6c5 Update searx.data - update_ahmia_blacklist.py 2022-07-29 02:01:04 +00:00
dalf
90068b3d0b Update searx.data - update_languages.py 2022-07-29 02:00:53 +00:00
Markus Heiser
c72d70d45c Revert "Quick fix for google engine for EU countries"
This reverts commit 747cf1a246.
2022-07-26 06:39:44 +02:00
Léon Tiekötter
950f036c03
[fix] google engine: results XPath 2022-07-26 00:24:15 +02:00
Émilien Devos
747cf1a246
Quick fix for google engine for EU countries
This revert part of the commit of 5fb2071cb2
2022-07-25 20:48:50 +00:00
Markus Heiser
0be0e63117 [fix] demo_online.py - fixed typo
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-25 20:04:00 +02:00
Emilien Devos
5fb2071cb2 [fix] google & youtube - set EU consent cookie
This change the previous bypass method for Google consent using
``ucbcb=1`` (6face215b8) to accept the consent using ``CONSENT=YES+``.

The youtube_noapi and google have a similar API, at least for the consent[1].

Get CONSENT cookie from google reguest::

    curl -i "https://www.google.com/search?q=time&tbm=isch" \
         -A "Mozilla/5.0 (X11; Linux i686; rv:102.0) Gecko/20100101 Firefox/102.0" \
         | grep -i consent
    ...
    location: https://consent.google.com/m?continue=https://www.google.com/search?q%3Dtime%26tbm%3Disch&gl=DE&m=0&pc=irp&uxe=eomtm&hl=en-US&src=1
    set-cookie: CONSENT=PENDING+936; expires=Wed, 24-Jul-2024 11:26:20 GMT; path=/; domain=.google.com; Secure
    ...

PENDING & YES [2]:

  Google change the way for consent about YouTube cookies agreement in EU
  countries. Instead of showing a popup in the website, YouTube redirects the
  user to a new webpage at consent.youtube.com domain ...  Fix for this is to
  put a cookie CONSENT with YES+ value for every YouTube request

[1] https://github.com/iv-org/invidious/pull/2207
[2] https://github.com/TeamNewPipe/NewPipeExtractor/issues/592

Closes: https://github.com/searxng/searxng/issues/1432
2022-07-25 13:27:06 +02:00
Markus Heiser
4231a5770b [fix] sjp engine - convert enginename to a latin1 compliance name
The engine name is not only a *name* its also a identifier that is used in
logs, HTTP headers and more.  Unicode characters in the name of an engine could
cause various issues.

Closes: https://github.com/searxng/searxng/issues/1544
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-24 21:10:55 +02:00
james-still
2516e21c58 [fix] emojipedia - update XPath to be relative 2022-07-24 19:14:26 +02:00
Markus Heiser
1540891561 [fix] engine tineye: handle 422 response of not supported img format
Closes: https://github.com/searxng/searxng/issues/1449
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-23 16:00:58 +02:00
searxng-bot
561433b12b [translations] update from Weblate
cf6e9482 - 2022-07-19 - Linerly <linerly@protonmail.com>
918c1bfe - 2022-07-20 - Markus Heiser <markus.heiser@darmarit.de>
4e65ecf6 - 2022-07-21 - calb sepherus <calb.sepherus@protonmail.com>
a54be8fe - 2022-07-19 - Markus Heiser <markus.heiser@darmarit.de>
cad6cb2f - 2022-07-19 - Markus Heiser <markus.heiser@darmarit.de>
a6bd1170 - 2022-07-19 - Markus Heiser <markus.heiser@darmarit.de>
9d0e8754 - 2022-07-19 - Markus Heiser <markus.heiser@darmarit.de>
2022-07-22 07:20:00 +00:00
Solirs
6d646129c3 [mod] add tor_check plugin - convenient tor checking trough searxng 2022-07-19 07:34:54 +02:00
Léon Tiekötter
d339e97727
[fix] preferences: missing option value
Fix missing option value "0".
2022-07-17 19:51:12 +02:00
Markus Heiser
7bf4e8d12d
Merge pull request #1512 from searxng/translations_update
Update translations
2022-07-15 09:45:03 +02:00
Markus Heiser
4e05197444
Merge pull request #1475 from return42/Emojipedia
[mod] Add engine for Emojipedia
2022-07-15 09:30:40 +02:00
Markus Heiser
445cba7c02 Update searx.data - update_engine_descriptions.py
./manage pyenv.cmd python ./searxng_extra/update/update_engine_descriptions.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-15 09:26:44 +02:00
Jay
10edcbe3c2 [mod] Add engine for Emojipedia
Emojipedia is an emoji reference website which documents the meaning and
common usage of emoji characters in the Unicode Standard.  It is owned by Zedge
since 2021. Emojipedia is a voting member of The Unicode Consortium.[1]

Cherry picked from @james-still [2[3] and slightly modified to fit SearXNG's
quality gates.

[1] https://en.wikipedia.org/wiki/Emojipedia
[2] 2fc01eb20f
[3] https://github.com/searx/searx/pull/3278
2022-07-15 09:26:44 +02:00
searxng-bot
f84e9f8154 [translations] update from Weblate
e78584e1 - 2022-07-14 - Markus Heiser <markus.heiser@darmarit.de>
eb3f2140 - 2022-07-14 - Markus Heiser <markus.heiser@darmarit.de>
9160b6d1 - 2022-07-14 - Markus Heiser <markus.heiser@darmarit.de>
18d569b8 - 2022-07-14 - Markus Heiser <markus.heiser@darmarit.de>
c9137f9e - 2022-07-14 - Hachiki <ninonakano408@gmail.com>
14d8b61f - 2022-07-14 - Markus Heiser <markus.heiser@darmarit.de>
c11e318d - 2022-07-09 - Linerly <linerly@protonmail.com>
4d53b3bb - 2022-07-12 - crazychicken1 <seymaomay1809@gmail.com>
613117bf - 2022-07-10 - Markus Heiser <markus.heiser@darmarit.de>
e5e38305 - 2022-07-11 - Markus Heiser <markus.heiser@darmarit.de>
2bea37fa - 2022-07-10 - Markus Heiser <markus.heiser@darmarit.de>
5ab15881 - 2022-07-11 - Markus Heiser <markus.heiser@darmarit.de>
32794ad3 - 2022-07-11 - Markus Heiser <markus.heiser@darmarit.de>
830b01f9 - 2022-07-11 - Chris Capisce <christof1588@gmail.com>
b4d431e5 - 2022-07-08 - John Doe <cryptiox@protonmail.com>
c6d9841e - 2022-07-10 - tents <remendne@pentrens.jp>
68692656 - 2022-07-13 - Markus Heiser <markus.heiser@darmarit.de>
8cba6d36 - 2022-07-10 - Markus Heiser <markus.heiser@darmarit.de>
fe457886 - 2022-07-08 - Markus Heiser <markus.heiser@darmarit.de>
95e7d403 - 2022-07-13 - Markus Heiser <markus.heiser@darmarit.de>
f02673b1 - 2022-07-11 - Markus Heiser <markus.heiser@darmarit.de>
7d49be29 - 2022-07-10 - Markus Heiser <markus.heiser@darmarit.de>
fbe6e4da - 2022-07-08 - Raúl Díaz <flan@chocoflan.net>
2022-07-15 07:19:07 +00:00
Léon Tiekötter
8e509941b9
[mod] allow brand.issue_url to overwrite the step1 url 2022-07-10 18:43:53 +02:00
Alexandre Flament
44f2eb50a5
Merge pull request #1219 from dalf/follow_bing_redirect
bing.py: remove redirection links
2022-07-10 18:06:22 +02:00
Emilien Devos
6face215b8 bypass google consent with ucbcb=1 2022-07-09 21:33:24 +00:00
Brock Vojković
84e2a3bd3f Add infinite scroll as a setting in settings.yml 2022-07-09 17:33:25 +00:00
Alexandre Flament
a1e8af0796 bing.py: resolve bing.com/ck/a redirections
add a new function searx.network.multi_requests to send multiple HTTP requests at once
2022-07-08 22:02:21 +02:00
Alexandre Flament
7e695c6644
Merge pull request #1478 from dalf/submit_bug_workflow
Engine error log: Submit a new issue button: ask the user to check if there are some existing issues.
2022-07-08 20:24:00 +02:00
Alexandre Flament
f90aed7ef9 locales.py: add support for Papiamento 2022-07-08 10:00:20 +02:00
searxng-bot
cb3a31c04d [translations] update from Weblate
b1809ae3 - 2022-07-07 - visiks-vs <vls@visiks.lv>
cf09e8b2 - 2022-07-07 - Markus Heiser <markus.heiser@darmarit.de>
5a854ba3 - 2022-07-07 - Markus Heiser <markus.heiser@darmarit.de>
e3586433 - 2022-07-06 - John Doe <cryptiox@protonmail.com>
9465ae78 - 2022-07-07 - Markus Heiser <markus.heiser@darmarit.de>
1e1799d0 - 2022-07-07 - Markus Heiser <markus.heiser@darmarit.de>
56429ebb - 2022-07-07 - Markus Heiser <markus.heiser@darmarit.de>
e1e040b1 - 2022-07-06 - watchakorn-18k <porton2559@gmail.com>
d04f51ef - 2022-07-06 - Adriano Xavier <px.adriano@gmail.com>
1a09e45a - 2022-07-06 - John Doe <cryptiox@protonmail.com>
fab4f6de - 2022-07-05 - Angelo B. J. Luidens <aluidens@stargue.com>
782eac5c - 2022-07-05 - watchakorn-18k <porton2559@gmail.com>
73f6dde9 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
eb3bf7a4 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
5c337616 - 2022-07-03 - Sangha Lee <totoriato@gmail.com>
8511391a - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
816ec364 - 2022-07-02 - Morten R. Bjørklund <mortenrb@live.no>
24adf82f - 2022-07-04 - 0xFFD <barann.afsarr@gmail.com>
25e13dcf - 2022-07-04 - networkneil <shankyneil1@gmail.com>
f2008c36 - 2022-07-03 - Markus Heiser <markus.heiser@darmarit.de>
79b9b12a - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
1f2f61c8 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
e7a1cd6e - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
fc02ccbf - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
3d1afa88 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
95c871d2 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
f8825dd1 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
a781c97c - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
7290ce9c - 2022-07-02 - John Doe <cryptiox@protonmail.com>
0a1286c5 - 2022-07-02 - tents <remendne@pentrens.jp>
baa49eef - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
3d3fbc15 - 2022-07-03 - Kuka Manó <dumpster@perjel.hu>
a1eb8798 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
a08b01a6 - 2022-07-02 - Xosé M <correo@xmgz.eu>
35634446 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
8d1fe456 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
805da3b0 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
c6f02cee - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
cd824613 - 2022-07-03 - Markus Heiser <markus.heiser@darmarit.de>
6a4b41ee - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
53eb448a - 2022-07-03 - adriadam10 <adriadam10@gmail.com>
7012f643 - 2022-07-03 - Gerard Oliva Viñas <oliva3032001@gmail.com>
51ea1d58 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
744d130c - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
e92d37cd - 2022-07-05 - Angelo B. J. Luidens <aluidens@stargue.com>
4576e883 - 2022-07-05 - watchakorn-18k <porton2559@gmail.com>
da7a9b10 - 2022-07-04 - Markus Heiser <markus.heiser@darmarit.de>
f20a317f - 2022-07-04 - networkneil <shankyneil1@gmail.com>
cab15b15 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
12d6021c - 2022-07-04 - niele2 <arifshafie.K@gmail.com>
c86a3738 - 2022-07-04 - niele2 <arifshafie.K@gmail.com>
9c6d05e2 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
2b6ca751 - 2022-07-02 - Kuka Manó <dumpster@perjel.hu>
55e9663c - 2022-07-02 - Albin Håkanson <albin@sweplox.se>
49fac625 - 2022-07-02 - Markus Heiser <markus.heiser@darmarit.de>
2022-07-08 07:18:05 +00:00
Alexandre Flament
be3ecf6e31 [build] /static 2022-07-08 09:04:57 +02:00
Alexandre Flament
eb489c45ea Submit GH bug: ask the user to do some checks before submitting a new issue 2022-07-08 09:04:57 +02:00
Markus Heiser
81e8c7370f Update searx.data - update_engine_descriptions.py
./manage pyenv.cmd python ./searxng_extra/update/update_engine_descriptions.py

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-07 17:16:41 +02:00
Markus Heiser
c63fab6928
Merge pull request #1443 from return42/fix-online_dictionary
[fix] online_dictionary: regular expression
2022-07-07 16:25:10 +02:00
Markus Heiser
480476fdf3 [fix] online_dictionary: regular expression
The query term of a engine-type `online_dictionary` can consist of more than one
word.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-07 15:58:29 +02:00
Alexandre Flament
df837d8b1b
Merge pull request #1428 from return42/fix-center_aligment
fix typo and document preference 'center_alignment' in the 'ui' section
2022-07-07 09:43:12 +02:00
Markus Heiser
c5ec8db6b3
Merge pull request #1457 from return42/fix-1435
[fix] engine z-zlibrary https URL
2022-07-06 13:44:08 +02:00
Markus Heiser
be2f782c9e
Merge pull request #1460 from unixfox/patch-1
Better explanation for the use of use_mobile_ui
2022-07-06 00:16:26 +02:00
Émilien Devos
63a995b8c1 Better explanation for the use of use_mobile_ui 2022-07-06 00:10:09 +02:00
mrpaulblack
38385e48cf fix: return body on limiter block so there is not just a blank page 2022-07-05 22:57:26 +02:00
Markus Heiser
970a69012b [fix] engine z-zlibrary https URL
before this patch:

    DEBUG   searx.engines.z-library : using base_url: https:https://de1lib.org

with this patch URL is fixed to:

    DEBUG   searx.engines.z-library : using base_url: https://de1lib.org

Closes: https://github.com/searxng/searxng/issues/1435
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-05 22:27:55 +02:00
Markus Heiser
8de0b62005 [build] /static 2022-07-04 19:06:45 +02:00