Commit Graph

24 Commits (9108c90f0e9d17a8a14b502be3d33d129c93d294)

Author SHA1 Message Date
Marc Abonce Seguin 448bfe6005 fix Qwant's fetch_languages function 4 years ago
Alexandre Flament d14994dc73 [httpx] replace searx.poolrequests by searx.network
settings.yml:

* outgoing.networks:
   * can contains network definition
   * propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
     keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
   * retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
   * local_addresses can be "192.168.0.1/24" (it supports IPv6)
   * support_ipv4 & support_ipv6: both True by default
     see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
   * either a full network description
   * either reference an existing network

* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
4 years ago
Alexandre Flament ca93a01844 [mod] dynamically set language_support variable
The language_support variable is set to True by default,
and set to False in only 5 engines.

Except the documentation and the /config URL, this variable is not used.

This commit remove the variable definition in the engines, and
set value according to supported_languages length: False when the length is 0,
True otherwise.

Close #2485
4 years ago
Alexandre Flament a4dcfa025c [enh] engines: add about variable
move meta information from comment to the about variable
so the preferences, the documentation can show these information
4 years ago
Alexandre Flament d703119d3a [enh] add raise_for_httperror
check HTTP response:
* detect some comme CAPTCHA challenge (no solving). In this case the engine is suspended for long a time.
* otherwise raise HTTPError as before

the check is done in poolrequests.py (was before in search.py).

update qwant, wikipedia, wikidata to use raise_for_httperror instead of raise_for_status
4 years ago
Alexandre Flament 58d72f2692 [mod] pylint: minor code change to allow pylint globally
This commit is only a step, it doesn't fix all the issues reported by pylint
4 years ago
Marc Abonce Seguin ea9d979cc3 add language names in qwant's fetch languages function 4 years ago
Dalf 1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 4 years ago
Adam Tauber 8850036ded [fix] add explicit useragent header to requests - closes #1459 5 years ago
Noémi Ványi b63d645a52 Revert "remove 'all' option from search languages"
This reverts commit 4d1770398a.
6 years ago
Marc Abonce Seguin 5568f24d6c [fix] check language aliases when setting search language 6 years ago
Adam Tauber 845ba79e75 [fix] update qwant search url
thx to @dalf for the fix (#1365)
6 years ago
Marc Abonce Seguin 772c048d01 refactor engine's search language handling
Add match_language function in utils to match any user given
language code with a list of engine's supported languages.

Also add language_aliases dict on each engine to translate
standard language codes into the custom codes used by the engine.
7 years ago
marc 4d1770398a remove 'all' option from search languages 7 years ago
Alexandre Flament f5128c7cb9 [mod] add/modify image fetching for bing_news, qwant and twitter engines 8 years ago
Adam Tauber 52e615dede [enh] py3 compatibility 8 years ago
marc fd65c12921 make search language handling less strict
languages.py can change, so users may query on a language that is not
on the list anymore, even if it is still recognized by a few engines.

also made no and nb the same because they seem to return the same,
though most engines will only support one or the other.
8 years ago
marc 805fb02ed1 add language support for qwant
closes issue #863
8 years ago
marc f62ce21f50 [mod] fetch supported languages for several engines
utils/fetch_languages.py gets languages supported by each engine and
generates engines_languages.json with each engine's supported language.
8 years ago
marc a11948c71b Add language support for more engines. 8 years ago
Adam Tauber c3dcebb778 [fix] remove html tags from qwant results 8 years ago
Cqoicebordel e0774c849c Removed the keywords from the settings in qwant engine 10 years ago
Cqoicebordel f05087b93a Refactor
Use only one engine for the four search from Qwant
10 years ago
Cqoicebordel 884eeb8541 New Qwant engines
- Web
- Images
- News
- Social media
10 years ago