1
0
mirror of https://github.com/searx/searx synced 2024-12-11 11:40:36 +01:00
searx/searx/engines
Alexandre Flament 3863f5a83f [enh] google engine: supports "default language"
Same behaviour behaviour than Whoogle [1].  Only the google engine with the
"Default language" choice "(all)"" is changed by this patch.

When searching for a locate place, the result are in the expect language,
without missing results [2]:

  > When a language is not specified, the language interpretation is left up to
  > Google to decide how the search results should be delivered.

The query parameters are copied from Whoogle.  With the ``all`` language:

- add parameter ``source=lnt``
- don't use parameter ``lr``
- don't add a ``Accept-Language`` HTTP header.

The new signature of function ``get_lang_info()`` is:

    lang_info = get_lang_info(params, lang_list, custom_aliases, supported_any_language)

Argument ``supported_any_language`` is True for google.py and False for the other
google engines.  With this patch the function now returns:

- query parameters: ``lang_info['params']``
- HTTP headers: ``lang_info['headers']``
- and as before this patch:
  - ``lang_info['subdomain']``
  - ``lang_info['country']``
  - ``lang_info['language']``

[1] https://github.com/benbusby/whoogle-search
[2] https://github.com/benbusby/whoogle-search/releases/tag/v0.5.4
2021-07-03 16:53:31 +02:00
..
__init__.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
1337x.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
ahmia.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
apkmirror.py [fix] APKMirror engine - update xpath selectors and fix img_src 2021-03-09 08:34:57 +01:00
archlinux.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
arxiv.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
bandcamp.py [fix] xpath expressions to grap all items from bandcamp's response 2021-04-15 08:52:11 +02:00
base.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
bing_images.py Fix paging of Bing Images 2021-02-22 21:19:34 +01:00
bing_news.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
bing_videos.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
bing.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
btdigg.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
ccengine.py Add Creative Commons search engine 2021-02-04 11:31:35 +01:00
command.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
core.py add core.ac.uk engine 2021-04-29 22:43:52 +02:00
currency_convert.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
dailymotion.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
deezer.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
deviantart.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
dictzone.py [enh] replace requests by httpx 2021-05-03 21:39:37 +02:00
digbt.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
digg.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
doku.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
duckduckgo_definitions.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
duckduckgo_images.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
duckduckgo.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
duden.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
dummy-offline.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
dummy.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
ebay.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
elasticsearch.py [enh] replace requests by httpx 2021-05-03 21:39:37 +02:00
etools.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
fdroid.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
flickr_noapi.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
flickr.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
framalibre.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
freesound.py Add Freesound engine (#2596) 2021-03-01 08:52:36 +01:00
frinkiac.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
genius.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
gentoo.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
gigablast.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
github.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
google_images.py [enh] google engine: supports "default language" 2021-07-03 16:53:31 +02:00
google_news.py [enh] google engine: supports "default language" 2021-07-03 16:53:31 +02:00
google_scholar.py [enh] google engine: supports "default language" 2021-07-03 16:53:31 +02:00
google_videos.py [enh] google engine: supports "default language" 2021-07-03 16:53:31 +02:00
google.py [enh] google engine: supports "default language" 2021-07-03 16:53:31 +02:00
ina.py [fix] make ina engine compatible with the new response json 2021-03-25 01:20:41 +01:00
invidious.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
json_engine.py [mod] json_engine: add content_html_to_text and title_html_to_text 2021-02-10 16:42:11 +01:00
kickass.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
loc.py Add Library of Congress engine 2021-02-09 12:45:39 +01:00
mediathekviewweb.py [enh] add engine MediathekViewWeb (API) 2021-02-09 13:08:01 +01:00
mediawiki.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
meilisearch.py Add Meilisearch engine 2021-04-06 21:57:05 +02:00
microsoft_academic.py fix Microsoft Academic engine 2021-03-15 20:21:28 +01:00
mixcloud.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
mysql_server.py Fix remote PEP8 errors as well 2021-04-29 22:05:31 +02:00
not_evil.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
nyaa.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
opensemantic.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
openstreetmap.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
pdbe.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
peertube.py Improve peertube searching 2021-02-13 19:47:33 +01:00
photon.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
piratebay.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
postgresql.py Fix remote PEP8 errors as well 2021-04-29 22:05:31 +02:00
pubmed.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
qwant.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
recoll.py [feat] recoll: paged json support 2021-02-07 10:05:35 -03:00
reddit.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
redis_server.py [fix] pylint 2021-05-30 19:25:03 +02:00
rumble.py Added rumble.com video search engine. TODO video embedding. 2021-02-20 12:48:56 +00:00
scanr_structures.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
searchcode_code.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
searx_engine.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
semantic_scholar.py Remove duplicated key from dict in Semantic Scholar 2021-03-27 16:58:32 +01:00
sepiasearch.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
seznam.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
sjp.py [fix] searxng fix: sjp engine 2021-05-03 21:51:29 +02:00
solidtorrents.py Fix URL to solidtorrent result page 2021-04-28 23:57:54 +02:00
solr.py Add Solr engine 2021-03-13 21:18:09 +01:00
soundcloud.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
spotify.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
springer.py [enh] Add Springer Nature engine 2021-04-29 22:43:52 +02:00
sqlite.py Add sqlite engine to pylint 2021-05-13 21:47:38 +02:00
stackoverflow.py [enh] replace requests by httpx 2021-05-03 21:39:37 +02:00
startpage.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
tokyotoshokan.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
torrentz.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
translated.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
unsplash.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
vimeo.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
wikidata.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
wikipedia.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
wolframalpha_api.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
wolframalpha_noapi.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
wordnik.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
www1x.py [enh] engines: add about variable 2021-01-14 20:57:17 +01:00
xpath.py [enh] xpath engine - add request parameter 'soft_max_redirects' 2021-05-22 20:41:36 +02:00
yacy.py [enh] replace requests by httpx 2021-05-03 21:39:37 +02:00
yahoo_news.py [fix] remove unused import from yahoo-news engine 2021-03-14 15:13:57 +01:00
yahoo.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
yggtorrent.py [httpx] replace searx.poolrequests by searx.network 2021-05-03 21:39:54 +02:00
youtube_api.py [mod] dynamically set language_support variable 2021-02-01 17:10:37 +01:00
youtube_noapi.py [fix] youtube - send CONSENT Cookie to not be redirected 2021-04-29 21:40:39 +02:00