summaryrefslogtreecommitdiff
path: root/searx/engines/qwant.py
AgeCommit message (Collapse)Author
2021-07-24[fix] qwant engine - prevent API locale exception on lang 'all'Markus Heiser
Has been reported in [1], error message:: Error Error: searx.exceptions.SearxEngineAPIException Percentage: 0 Parameters: ('API error::locale must be a string,locale must be one of the following values: en_gb, en_ie, en_us, en_ca, en_in, en_my, en_au, en_nz, cy_gb, gd_gb, de_de, de_ch, de_at, fr_fr, br_fr, fr_be, fr_ch, fr_ca, fr_ad, fc_ca, ec_ca, co_fr, es_es, es_ar, es_cl, es_co, es_mx, es_pe, es_ad, ca_es, ca_ad, ca_fr, eu_es, eu_fr, it_it, it_ch, pt_br, pt_pt, pt_ad, nl_be, nl_nl, pl_pl, zh_hk, zh_cn, fi_fi, bg_bg, et_ee, hu_hu, da_dk, nb_no, sv_se, ko_kr, th_th, cs_cz, ro_ro, el_gr',) File name: searx/engines/qwant.py:114 Function: response Code: raise SearxEngineAPIException('API error::' + msg) [1] https://github.com/searxng/searxng/issues/222 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-24[fix] qwant engine - prevent exception on date/time value is NoneMarkus Heiser
Has been reported in [1], error messages:: Error Error: ValueError Percentage: 0 Parameters: () File name: searx/engines/qwant.py:159 Function: response Code: pub_date = datetime.fromtimestamp(item['date'], None) Error Error: TypeError Percentage: 0 Parameters: ('an integer is required (got type NoneType)',) File name: searx/engines/qwant.py:196 Function: response Code: pub_date = datetime.fromtimestamp(item['date']) Fix timedelta from seconds to milliseconds [1], error message:: Error Error: TypeError Percentage: 0 Parameters: ('unsupported type for timedelta seconds component: NoneType',) File name: searx/engines/qwant.py:195 Function: response Code: length = timedelta(seconds=item['duration']) [1] https://github.com/searxng/searxng/issues/222 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-16[mod] qwant engine: fix typos / minor changeAlexandre Flament
minor modification of commit 628b5703f3aeeed117772696f83efb344d6f337e (no functionnal change)
2021-07-15[mod] improve video results of the qwant engineMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-07-14[fix] Qwant engines - implement API v3 and add 'quant videos'Markus Heiser
The implementation uses the Qwant API (https://api.qwant.com/v3). The API is undocumented but can be reverse engineered by reading the network log of https://www.qwant.com/ queries. This implementation is used by different qwant engines in the settings.yml:: - name: qwant categories: general ... - name: qwant news categories: news ... - name: qwant images categories: images ... - name: qwant videos categories: videos ... Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-05-02fix Qwant's fetch_languages functionMarc Abonce Seguin
2021-04-12[httpx] replace searx.poolrequests by searx.networkAlexandre Flament
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)
2021-02-01[mod] dynamically set language_support variableAlexandre Flament
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
2021-01-14[enh] engines: add about variableAlexandre Flament
move meta information from comment to the about variable so the preferences, the documentation can show these information
2020-12-11[enh] add raise_for_httperrorAlexandre Flament
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
2020-11-03[mod] pylint: minor code change to allow pylint globallyAlexandre Flament
This commit is only a step, it doesn't fix all the issues reported by pylint
2020-09-22add language names in qwant's fetch languages functionMarc Abonce Seguin
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2019-12-21[fix] add explicit useragent header to requests - closes #1459Adam Tauber
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2019-01-06[fix] check language aliases when setting search languageMarc Abonce Seguin
2018-08-13[fix] update qwant search urlAdam Tauber
thx to @dalf for the fix (#1365)
2018-03-27refactor engine's search language handlingMarc Abonce Seguin
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.
2017-12-06remove 'all' option from search languagesmarc
2017-05-15[mod] add/modify image fetching for bing_news, qwant and twitter enginesAlexandre Flament
2017-05-15[enh] py3 compatibilityAdam Tauber
2017-03-18make search language handling less strictmarc
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.
2017-03-18add language support for qwantmarc
closes issue #863
2016-12-13[mod] fetch supported languages for several enginesmarc
utils/fetch_languages.py gets languages supported by each engine and generates engines_languages.json with each engine's supported language.
2016-12-13Add language support for more engines.marc
2016-12-10[fix] remove html tags from qwant resultsAdam Tauber
2015-06-02Removed the keywords from the settings in qwant engineCqoicebordel
2015-06-02RefactorCqoicebordel
Use only one engine for the four search from Qwant
2015-06-01New Qwant enginesCqoicebordel
- Web - Images - News - Social media