Markus Heiser
6579d6d558
[fix] qwant - API error::locale must be one ..
...
The request function should not request a language (aka locale) that is not
supported by qwant. Select a locale like zh-TW ends in qwant's API error:
ERROR searx.engines.qwant news: exception : \
API error::locale must be one of the following values: \
en_gb, en_ie, en_us, en_ca, en_my, en_au, en_nz, de_de, de_ch, de_at, fr_fr, \
fr_be, fr_ch, fr_ca, fr_ad, fc_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_pt, pt_ad, \
nl_be, nl_nl
The existing searx.utils.match_language function is unsuitable for this purpose,
it is replaced by function searx.locales.get_engine_locale that is based on the
methods from the babel package.
The quant's _fetch_supported_languages function has been revised to filter out
languages 8aka locales) not supported by qwant.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14 10:36:14 +02:00
..
2022-08-01 17:01:59 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-01-05 11:00:11 +01:00
2022-01-05 11:00:11 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-02-21 22:12:07 +01:00
2021-12-27 09:26:22 +01:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-02-01 08:02:42 +01:00
2022-05-07 18:23:10 +02:00
2022-02-18 19:00:49 +01:00
2021-12-27 09:26:22 +01:00
2022-08-01 17:01:59 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 10:16:20 +01:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-01-05 11:03:44 +01:00
2021-12-27 09:26:22 +01:00
2021-01-14 20:57:17 +01:00
2022-04-16 19:10:35 +02:00
2021-12-27 09:26:22 +01:00
2022-07-24 19:14:26 +02:00
2022-01-05 11:00:11 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-02-13 14:20:47 +01:00
2021-12-27 09:26:22 +01:00
2022-02-21 22:12:07 +01:00
2022-01-05 11:00:11 +01:00
2022-01-05 11:00:11 +01:00
2022-01-05 11:00:11 +01:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-01 17:01:59 +02:00
2022-08-10 18:55:31 +02:00
2022-01-05 11:03:44 +01:00
2022-01-28 22:33:41 +01:00
2022-02-18 19:00:49 +01:00
2022-05-07 18:23:10 +02:00
2022-06-11 14:17:44 +02:00
2021-12-27 09:26:22 +01:00
2022-07-04 19:06:45 +02:00
2021-12-27 09:26:22 +01:00
2022-03-07 19:49:16 +01:00
2021-12-27 09:26:22 +01:00
2021-09-07 13:26:59 +02:00
2022-02-19 21:59:12 +01:00
2022-07-30 18:04:44 +02:00
2022-07-30 18:04:44 +02:00
2021-12-27 09:26:22 +01:00
2021-01-14 20:57:17 +01:00
2022-08-01 17:01:59 +02:00
2022-01-07 14:14:31 +01:00
2021-12-27 09:26:22 +01:00
2022-02-18 19:00:49 +01:00
2022-06-02 14:32:37 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-07-30 18:04:44 +02:00
2021-12-27 09:26:22 +01:00
2022-08-14 10:36:14 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-01-02 21:18:29 +01:00
2022-03-05 11:53:41 +01:00
2022-02-18 19:00:49 +01:00
2022-01-05 11:00:11 +01:00
2022-07-24 21:10:55 +02:00
2022-02-04 14:55:21 +01:00
2021-12-27 09:26:22 +01:00
2022-02-19 21:59:12 +01:00
2022-02-18 19:00:49 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-03-19 14:16:37 +01:00
2022-07-23 16:00:58 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-01-05 11:03:44 +01:00
2021-12-27 09:26:22 +01:00
2022-02-18 19:00:49 +01:00
2022-06-11 11:09:21 +02:00
2022-08-01 17:01:59 +02:00
2022-04-12 10:37:33 +01:00
2021-12-27 09:26:22 +01:00
2021-12-27 09:26:22 +01:00
2022-01-30 19:48:40 +01:00
2022-04-17 11:29:23 +02:00
2021-12-27 09:26:22 +01:00
2021-12-27 10:16:20 +01:00
2022-04-22 16:09:36 +02:00
2022-02-18 19:00:49 +01:00
2022-07-25 13:27:06 +02:00
2022-07-05 22:27:55 +02:00