summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-25[mod] limiter plugin: Accept-Encoding handlingLéon Tiekötter
Only raise "suspicious Accept-Encoding" when both "gzip" and "deflate" are missing from Accept-Encoding. Prevent Browsers which only implement one compression solution from being blocked by the limiter plugin. Example Browser which is currently blocked: Lynx Browser (https://lynx.invisible-island.net)
2022-08-25add apple maps engineta
2022-08-25Merge pull request #1688 from liimee/eng-9gagAlexandre Flament
Add 9gag engine
2022-08-24get the not cropped version of the thumbnail when the image height is not ↵ta
too important
2022-08-24add safesearch supportta
2022-08-24add developer info as authorta
2022-08-24add the apple app store engineta
The Apple App Store is the digital app distribution platform for iOS & iPadOS.
2022-08-24support playing videos directlyta
2022-08-23Merge pull request #1693 from return42/fix-1692Markus Heiser
[fix] Internal server error after changing UI language to BG
2022-08-23[fix] Internal server error after changing UI language to BGMarkus Heiser
A placeholder has been translated to BG, issue was added 8 month ago, when BG translation was added [1] msgid "Compute {functions} of the arguments" msgstr "Изчислете {функции} на аргументите" The incorrect translation has been corrected here in the message files and on weblate. [1] https://weblate.bubu1.eu/translate/searxng/searxng/bg/?&offset=49#history Closes: https://github.com/searxng/searxng/issues/1692 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-23add tags as suggestionsta
2022-08-22use `invalid-name` instead of `C0103` for pylintta
2022-08-22add 9gag engineta
9GAG is a social media website where users upload and share user-generated images and videos
2022-08-22don't raise error when nothing was foundta
2022-08-22Merge pull request #1686 from asenov/fix-bing_bideosMarkus Heiser
[fix] Bing videos search Index error
2022-08-21fixed xpath selector for appropriate resultsM Asenov
2022-08-21Merge pull request #1661 from liimee/eng-twAlexandre Flament
Add twitter engine
2022-08-21Merge pull request #1666 from return42/harden-get_engine_localesMarkus Heiser
[fix] typo in get_engine_locale
2022-08-20Merge pull request #1682 from return42/fix-dudenMarkus Heiser
[fix] engine duden - don't raise exception on empty result list
2022-08-20[fix] engine duden - don't raise exception on empty result listMarkus Heiser
Duden expects a word in German, so with query "amazing" the site finds nothing and respons a 404: httpx.HTTPStatusError: Client error '404 Not Found' for url\ 'https://www.duden.de/suchen/dudenonline/amazing' [1] https://github.com/searxng/searxng/issues/1543#issuecomment-1193317054 Suggested-by: @allendema [1] Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-19Merge pull request #1677 from searxng/dependabot/pip/master/pygments-2.13.0Markus Heiser
Bump pygments from 2.12.0 to 2.13.0
2022-08-19Merge pull request #1676 from searxng/dependabot/pip/master/selenium-4.4.3Markus Heiser
Bump selenium from 4.4.0 to 4.4.3
2022-08-19[build] /staticMarkus Heiser
2022-08-19make pygments.lessMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-19Merge pull request #1678 from searxng/translations_updateMarkus Heiser
Update translations
2022-08-19[translations] update from Weblatesearxng-bot
2b94abf3 - 2022-08-13 - Markus Heiser <markus.heiser@darmarit.de> 249c92f8 - 2022-08-13 - gkkulik <gregorykkulik@gmail.com> a331870c - 2022-08-12 - Markus Heiser <markus.heiser@darmarit.de> 5aca8ddc - 2022-08-17 - Markus Heiser <markus.heiser@darmarit.de> 6e7d76a0 - 2022-08-18 - Markus Heiser <markus.heiser@darmarit.de> 2a49e5f0 - 2022-08-15 - Markus Heiser <markus.heiser@darmarit.de> 2d2cafa6 - 2022-08-18 - Content Card <weblate-bubu1@gabg.email> adcf97ed - 2022-08-15 - Markus Heiser <markus.heiser@darmarit.de>
2022-08-19Bump pygments from 2.12.0 to 2.13.0dependabot[bot]
Bumps [pygments](https://github.com/pygments/pygments) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.12.0...2.13.0) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19Bump selenium from 4.4.0 to 4.4.3dependabot[bot]
Bumps [selenium](https://github.com/SeleniumHQ/Selenium) from 4.4.0 to 4.4.3. - [Release notes](https://github.com/SeleniumHQ/Selenium/releases) - [Commits](https://github.com/SeleniumHQ/Selenium/commits) --- updated-dependencies: - dependency-name: selenium dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17add explanation of tokenta
2022-08-17add profile image to user resultsta
2022-08-17add thumbnail to results if availableta
2022-08-14[fix] get_engine_locale: better approximation of 'en' is 'en-US'Markus Heiser
Compared to `en-EN` the better approximation of 'en' is 'en-US'. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14[fix] typo in get_engine_localeMarkus Heiser
Due to a typo in get_engine_locale, a language selection like `!qw :de siemens` did not work. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14Merge pull request #1664 from return42/harden-get_engine_localesMarkus Heiser
[fix] harden get_engine_locale: handle UnknownLocaleError exceptions
2022-08-14[fix] harden get_engine_locale: handle UnknownLocaleError exceptionsMarkus Heiser
When a user selects an unknown or invalid locale by using the search syntax: !qw siemens :de-TW Before this patch a UnknownLocaleError exception will be rasied: ``` Traceback (most recent call last): File "SearXNG/searx/search/processors/online.py", line 154, in search search_results = self._search_basic(query, params) File "SearXNG/searx/search/processors/online.py", line 128, in _search_basic self.engine.request(query, params) File "SearXNG/searx/engines/qwant.py", line 98, in request q_locale = get_engine_locale(params['language'], supported_languages, default='en_US') File "SearXNG/searx/locales.py", line 216, in get_engine_locale locale = babel.Locale.parse(searxng_locale, sep='-') File "SearXNG/local/py3/lib/python3.8/site-packages/babel/core.py", line 330, in parse raise UnknownLocaleError(input_id) ``` This patch implements a simple exception handling, since e.g. `de-TW` does not exists `de` will be used to get engines locale. On invalid terms like `xy-XY` the default will be returned. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14Merge pull request #1652 from return42/mod-qwantMarkus Heiser
Improve qwant engine
2022-08-14[mod] qwant - add safesearch optionMarkus Heiser
Closes: https://github.com/searxng/searxng/issues/1640 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14[fix] qwant - API error::locale must be one ..Markus Heiser
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[mod] add locale.get_engine_locale to get predictable resultsMarkus Heiser
The match_language function sometimes returns incorrect results which is why a new function get_engine_locale is required. A bugfix of the match_language is not easily possible, because there is almost no documentation for it and already the call parameters are undefined. E.g. the function processes values like the ones from yahoo:: "yahoo": [ "ar", ... "zh_chs", "zh_cht" ] The get_engine_locale has been documented in detail, there is a clear description of the assumptions as well as the requirements and approximation rules (read doc-string for more details):: Argument ``engine_locales`` is a python dict that maps *SearXNG locales* to corresponding *engine locales*: <engine>: { # SearXNG string : engine-string 'ca-ES' : 'ca_ES', 'fr-BE' : 'fr_BE', 'fr-CA' : 'fr_CA', 'fr-CH' : 'fr_CH', 'fr' : 'fr_FR', ... 'pl-PL' : 'pl_PL', 'pt-PT' : 'pt_PT' } .. hint:: The *SearXNG locale* string has to be known by babel! In the following you will find a comparison: >>> import babel.languages >>> from searx.utils import match_language >>> from searx.locales import get_engine_locale Assume we have an engine that supports the follwoing locales: >>> lang_list = { ... "zh-CN": "zh_CN", ... "zh-HK": "zh_HK", ... "nl-BE": "nl_BE", ... "fr-CA": "fr_CA", ... } Assumption: A. When a user selects a language the results should be optimized according to the selected language. B. When user selects a language and a territory the results should be optimized with first priority on territory and second on language. ---- Example: (Assumption A.) A user selects region 'zh-TW' which should end in zh_HK hint: CN is 'Hans' and HK ('Hant') fits better to TW ('Hant') >>> get_engine_locale('zh-TW', lang_list) 'zh_HK' >>> lang_list[match_language('zh-TW', lang_list)] 'zh_CN' ---- Example: (Assumption A.) A user selects only the language 'zh' which should end in CN >>> get_engine_locale('zh', lang_list) 'zh_CN' >>> lang_list[match_language('zh', lang_list)] 'zh_CN' ---- Example: (Assumption B.) A user selects region 'fr-BE' which should end in nl-BE hint: priority should be on the territory the user selected. If the user prefers 'fr' he will select 'fr' without a region tag. >>> get_engine_locale('fr-BE', lang_list, default='unknown') 'nl_BE' >>> match_language('fr-BE', lang_list, fallback='unknown') 'fr-CA' ---- Example: (Assumption A.) A user selects only the language 'fr' which should end in fr_CA >>> get_engine_locale('fr', lang_list) 'fr_CA' >>> lang_list[match_language('fr', lang_list)] 'fr_CA' ---- The difference in priority on the territory is best shown with a engine that supports the following locales: >>> lang_list = { ... "fr-FR": "fr_FR", ... "fr-CA": "fr_CA", ... "en-GB": "en_GB", ... "nl-BE": "nl_BE", ... } ---- Example: (Assumption A.) A user selects only a language >>> get_engine_locale('en', lang_list) 'en_GB' >>> match_language('en', lang_list) 'en-GB' hint: the engine supports fr_FR and fr_CA since no territory is given, fr_FR takes priority .. >>> get_engine_locale('fr', lang_list) 'fr_FR' >>> lang_list[match_language('fr', lang_list)] 'fr_FR' ---- Example: (Assumption B.) A user selects region 'fr-BE' which should end in nl-BE >>> get_engine_locale('fr-BE', lang_list) 'nl_BE' >>> lang_list[match_language('fr-BE', lang_list)] 'fr_FR' ---- If the user selects a language and there are two locales like the following: >>> lang_list = { ... "fr-BE": "fr_BE", ... "fr-CH": "fr_CH", ... } >>> >>> get_engine_locale('fr', lang_list) 'fr_BE' >>> lang_list[match_language('fr', lang_list)] 'fr_BE' Looks like both functions return the same value, but match_language depends on the order of the dictionary (which is not predictable): >>> lang_list = { ... "fr-CH": "fr_CH", ... "fr-BE": "fr_BE", ... } >>> get_engine_locale('fr', lang_list) 'fr_BE' >>> lang_list[match_language('fr', lang_list)] 'fr_CH' >>> The get_engine_locale selects the locale by looking at the "population percent" and this percentage has an higher amount in BE (68.%) compared to CH (21%) Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14[mod] decouple qwant's categories from SearXNG's categoriesMarkus Heiser
By using new property `qwant_categ:` the category of qwant is no longer bound to the category of SearXNG. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-14add twitter engineta
2022-08-13Merge pull request #1656 from searxng/dependabot/pip/master/flask-2.2.2Alexandre Flament
Bump flask from 2.1.3 to 2.2.2
2022-08-13Merge pull request #1655 from return42/fix-opensearchMarkus Heiser
[fix] improve OpenSearch description
2022-08-13Merge pull request #1660 from liimee/eng-neevaLéon Tiekötter
Add neeva engine
2022-08-13Fix time range support and add soft_max_redirectsLéon Tiekötter
Add custom time_range_url and time_range_map Set soft_max_redirects = 2 to prevent "ErrorContext('searx/search/processors/online.py', 116, 'count_error(', None, '2 redirects, maximum: 0', ('200', 'OK', 'neeva.com')) True"
2022-08-13add neeva web engineta
Neeva is "the world's first ad-free, private search engine" and uses data from Apple, Bing, Yelp and "others". They claim to crawl "hundreds of millions" of URLs a day (https://twitter.com/Neeva/status/1536447373903335426).
2022-08-12Merge pull request #1657 from searxng/dependabot/pip/master/selenium-4.4.0Markus Heiser
Bump selenium from 4.3.0 to 4.4.0
2022-08-12Merge pull request #1658 from searxng/dependabot/pip/master/setproctitle-1.3.2Markus Heiser
Bump setproctitle from 1.3.1 to 1.3.2
2022-08-12Merge pull request #1659 from searxng/translations_updateMarkus Heiser
Update translations
2022-08-12[translations] update from Weblatesearxng-bot
f2997bfa - 2022-08-12 - Markus Heiser <markus.heiser@darmarit.de> eeca674f - 2022-08-10 - Edrean Ernst <edrean@allesbeste.com> 7478de6a - 2022-08-11 - Markus Heiser <markus.heiser@darmarit.de> c4fb9110 - 2022-08-07 - wordpure <wordlesspure@gmail.com> a5b432e2 - 2022-08-11 - Markus Heiser <markus.heiser@darmarit.de> eb01d415 - 2022-08-09 - Markus Heiser <markus.heiser@darmarit.de> f96eb06e - 2022-08-11 - Shopimisrel <shopisrael12@gmail.com> e7c79191 - 2022-08-08 - ajnasaboobacker <ajnasaboobacker@gmail.com> f4dbd424 - 2022-08-08 - ajnasaboobacker <ajnasaboobacker@gmail.com>