diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2022-04-08 11:17:45 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2022-04-16 09:27:34 +0200 |
commit | 3bb62823ec3af0e67bd2d959bec20c4791ee3bac (patch) | |
tree | 7a4d9dc863b76a9d57902c101cd3712b64add7b8 /tests/unit | |
parent | 27f8fa6fe066c15dfc60bc2c50533ef87663ce29 (diff) | |
download | searxng-3bb62823ec3af0e67bd2d959bec20c4791ee3bac.tar.gz searxng-3bb62823ec3af0e67bd2d959bec20c4791ee3bac.zip |
[fix] dailymotion engine: filter by language & country
- fix the issue of fetching more the 7000 *languages*
- improve the request function and filter by language & country
- implement time_range_support & safesearch
- add more fields to the response from dailymotion (allow_embed, length)
- better clean up of HTML tags in the 'content' field.
This is more or less a complete rework based on the '/videos' API from [1].
This patch cleans up the language list in SearXNG that has been polluted by the
ISO-639-3 2 and 3 letter codes from dailymotion languages which have never been
used.
[1] https://developers.dailymotion.com/tools/
Closes: https://github.com/searxng/searxng/issues/1065
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/test_query.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test_query.py b/tests/unit/test_query.py index 0bbf8b4ba..db25da8f3 100644 --- a/tests/unit/test_query.py +++ b/tests/unit/test_query.py @@ -129,8 +129,8 @@ class TestLanguageParser(SearxTestCase): query = RawTextQuery(':hu-H', []) self.assertEqual(query.autocomplete_list, [":hu-hu"]) - query = RawTextQuery(':v', []) - self.assertEqual(query.autocomplete_list, [':vi', ':tiếng việt', ':việt_nam']) + query = RawTextQuery(':zh-', []) + self.assertEqual(query.autocomplete_list, [':zh-cn', ':zh-hk', ':zh-tw']) class TestTimeoutParser(SearxTestCase): |