summaryrefslogtreecommitdiff
path: root/searx/engines
AgeCommit message (Collapse)Author
2025-06-22[feat] engines: add Tube Archivist engine (#4889)Robert M. Clabough
Tube Archivist [1] is a self-hosted project which archives youtube videos on your own local server. This engine connects with Tube Archivist's search API to allow searching from SearXNG into your own hosted videos. [1] https://www.tubearchivist.com/ Signed-off-by: Robert M. Clabough <robert@claobugh.tech> Co-authored-by: Bnyro <bnyro@tutanota.com> Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-06-22[refactor] yahoo engine: fix missing results and improve request code ↵useralias
structure (#4923) Changes: - Add required iscqry, pz and bct search parameters - Remove unused/optional search parameters (ei, fr2, age) - Fix offset calculation - Use new sB cookie for filters (time, safesearch, language) - Group related parameter assignments together - Restructure request parameter building to better match a real request - Use f-strings for string formatting - Add logging of domain and cookies used Related: - https://github.com/searxng/searxng/issues/4910
2025-06-08[feat] bing: raise error upon receiving wrong results page0xhtml
2025-06-03[fix] startpage engine: resolve instant CAPTCHA issues (#4890)useralias
Changes: - Improve log messages for better debugging of future CAPTCHA issues - Fixed erroneous get_sc_url variable where sc was always blank (when no cached value) - Move Origin and Referer headers to request() function - Add missing form parameters (abp, abd, abe) required by Startpage to avoid being flagged as automated requests - Include segment parameter for paginated requests - Clean up unnecessary commented-out headers - Fix minor typos e.g. "time-stamp" → "timestamp", "scrap" → "scrapes" Related: - https://github.com/searxng/searxng/issues/4673
2025-05-31[mod] weather results: add types, i18n/l10n, symbols & unit conversionsMarkus Heiser
The types necessary for weather information such as GeoLocation, DateTime, Temperature,Pressure, WindSpeed, RelativeHumidity, Compass (wind direction) and symbols for the weather have been implemented. There are unit conversions and translations for weather property labels. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-31[feat] open meteo: use new weather answererBnyro
2025-05-28[fix] presearch: reuse response cookies from token extractionBnyro
Why? - presearch requires the response cookies of the first request to be sent within the second request - otherwise we miss auth information and the engine doesn't work Related: - https://github.com/searxng/searxng/pull/4858 - closes https://github.com/searxng/searxng/issues/4854 Co-authored-by: Aadniz <8147434+Aadniz@users.noreply.github.com>
2025-05-25[mod] data: implement a simple currencies (SQL) database (#4836)Markus Heiser
To reduce the memory footprint, this patch no longer loads the JSON data completely into memory. Instead, there is an SQL database based on `ExpireCacheSQLite`. The class CurrenciesDB is a simple DB application that encapsulates the DB (queries and initialization) and provides convenient methods like `name_to_iso4217` and `iso4217_to_name`. Related: - https://github.com/searxng/searxng/discussions/1892 - https://github.com/searxng/searxng/pull/3458#issuecomment-2900807671 - https://github.com/searxng/searxng/pull/4650 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-24[mod] engines: Yahoo in different languages (#4826)Markus Heiser
BTW fix issue reported in [1] [1] https://github.com/searxng/searxng/pull/4814#issuecomment-2896948787 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-05-23[fix] ddg engine: IndexError exception is raised on empty contend (#4843)Markus Heiser
Sometimes (e.g. when ddg does not have a result item) there is no content and the engine will fail with an IndexError: * Error: IndexError * Percentage: 10 * Parameters: `()` * File name: `searx/engines/duckduckgo.py:375` * Function: `response` * Code: `item["content"] = extract_text(eval_xpath(div_result, './/a[contains(@class, "result__snippet")]')[0])` Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-23[refactor] duckduckgo engine: improve request logic and code structure (#4837)useralias
Changes: - Add trailing slash to base URL to prevent potential redirects - Remove advanced search syntax filtering (no longer guarantees a CAPTCHA) - Correct pagination offset calculation: Page 2 now starts at offset 10, subsequent pages use 10 + (n-2)*15 formula instead of the previous broken 20 + (n-2)*50 calculation that caused CAPTCHAs - Restructure request parameter building to better match a real request - "kt" cookie is no longer an empty string if the language/region is "all" - Group related parameter assignments together - Add header logging to debugging output Related: - https://github.com/searxng/searxng/issues/4824
2025-05-22[fix] searx.data: fetch-traits - z-library (httpx.ConnectError) (#4835)Markus Heiser
There is currently no known z-library, and all known URLs are dead [1]. To avoid interrupting automated updates, a connection error to a z-library is treated as a *known error*, and the old properties of the z-library are retained. [1] https://github.com/searxng/searxng/issues/3610 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-21[feat] engines: add Naver engine (#4573)Zhijie He
Refactor Naver engine (Web, News, Images, Videos, Autocomplete) - ref: https://search.naver.com/ - lang: `ko` - Wikidata: https://www.wikidata.org/wiki/Q485639 Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-05-21[fix] pinterest: engine broken due to API changes (#4816)Bnyro
- apparently the API now requires a `X-Pinterest-PWS-Handler` in order to properly function (extracted from their web UI) - the other `X-Pinterest` headers here are added in case they become mandatory too Closes: https://github.com/searxng/searxng/issues/4812
2025-05-21[feat] engines: add uxwing engine for icons (#4819)Bnyro
- uxwing provides attribution-free icons to use for design projects - svgrepo was my go-to before, but it's ratelimiting a lot recently
2025-05-21[refactor] icon engines: add new icon category (#4817)Bnyro
Icons category makes sense because it allows to quickly search for free SVG icons to use for websites / other designs with a quick `!icons` query Icons don't seem to fit into the normal images category that well because icons are quite a special type of images
2025-05-20[chore] fix some docstring typos (#4815)Jost Alemann
2025-05-20[fix] yahoo: url and title xpathuseralias
2025-05-20[fix] duckduckgo engines: issue when get_vqd() is used by ddg-images and ↵Markus Heiser
ddg-videos (#4809) The global variable CACHE is not initialized when DDG images or DDG videos import the get_vqd() function (please remember: the engine modules are imported using the importlib method and not via the `import` keyword). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-18[mod] engine invidious: commented out / no public API available nowadays (#4800)Markus Heiser
Reported-by: @unifox https://github.com/searxng/searxng/issues/2722#issuecomment-2884993248 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-13[fix] engine archlinux: avoid Anubis challenge by User-Agent "SearXNG" (#4779)Markus Heiser
Of the archlinux wikis only wiki.archlinux.org has a has Anubis challenge. About Anubis[1]: > Anubis decides to present a challenge using this logic: > > - User-Agent contains "Mozilla" > ... > This should ensure that git clients, RSS readers, and other low-harm clients > can get through without issue .. [1] https://github.com/TecharoHQ/anubis/blob/6c0ff3f4d5e7a66ea85e5873e6ee4c28692091d7/docs/docs/design/how-anubis-works.mdx#challenge-presentation Suggested-by: @unixfox https://github.com/searxng/searxng/issues/4646#issuecomment-2855322406 Closes: https://github.com/searxng/searxng/issues/4646 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03[mod] engines: migration of the individual cache solutions to EngineCacheMarkus Heiser
The EngineCache class replaces all previously individual solutions for caches in the context of the engines. - demo_offline.py - duckduckgo.py - radio_browser.py - soundcloud.py - startpage.py - wolframalpha_api.py - wolframalpha_noapi.py Search term to test most of the modified engines:: !ddg !rb !sc !sp !wa test !ddg !rb !sc !sp !wa foo For introspection of the DB, jump into developer environment and run command to show cache state:: $ ./manage pyenv.cmd bash --norc --noprofile (py3) python -m searx.enginelib cache state cache tables and key/values =========================== [demo_offline ] 2025-04-22 11:32:50 count --> (int) 4 [startpage ] 2025-04-22 12:32:30 SC_CODE --> (str) fSOBnhEMlDfE20 [duckduckgo ] 2025-04-22 12:32:31 4dff493e.... --> (str) 4-128634958369380006627592672385352473325 [duckduckgo ] 2025-04-22 12:40:06 3e2583e2.... --> (str) 4-263126175288871260472289814259666848451 [radio_browser ] 2025-04-23 11:33:08 servers --> (list) ['https://de2.api.radio-browser.info', ...] [soundcloud ] 2025-04-29 11:40:06 guest_client_id --> (str) EjkRJG0BLNEZquRiPZYdNtJdyGtTuHdp [wolframalpha ] 2025-04-22 12:40:06 code --> (str) 5aa79f86205ad26188e0e26e28fb7ae7 number of tables: 6 number of key/value pairs: 7 In the "cache tables and key/values" section, the table name (engine name) is at first position on the second there is the calculated expire date and on the third and fourth position the key/value is shown. About duckduckgo: The *vqd coode* of ddg depends on the query term and therefore the key is a hash value of the query term (to not to store the raw query term). In the "properties of ENGINES_CACHE" section all properties of the SQLiteAppl / ExpireCache and their last modification date are shown:: properties of ENGINES_CACHE =========================== [last modified: 2025-04-22 11:32:27] DB_SCHEMA : 1 [last modified: 2025-04-22 11:32:27] LAST_MAINTENANCE : [last modified: 2025-04-22 11:32:27] crypt_hash : ca612e3566fdfd7cf7efe2b1c9349f461158d07cb78a3750e5c5be686aa8ebdc [last modified: 2025-04-22 11:32:30] CACHE-TABLE--demo_offline: demo_offline [last modified: 2025-04-22 11:32:30] CACHE-TABLE--startpage: startpage [last modified: 2025-04-22 11:32:31] CACHE-TABLE--duckduckgo: duckduckgo [last modified: 2025-04-22 11:33:08] CACHE-TABLE--radio_browser: radio_browser [last modified: 2025-04-22 11:40:06] CACHE-TABLE--soundcloud: soundcloud [last modified: 2025-04-22 11:40:06] CACHE-TABLE--wolframalpha: wolframalpha These properties provide information about the state of the ExpireCache and control the behavior. For example, the maintenance intervals are controlled by the last modification date of the LAST_MAINTENANCE property and the hash value of the password can be used to detect whether the password has been changed (in this case the DB entries can no longer be decrypted and the entire cache must be discarded). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-02[fix] semantic scholar: method not allowed / engine doesn't workBnyro
Fixes the semantic scholar engine by extracting a ui version token. BTW: remove html tags from the content. Author's checklist: - they are ratelimiting very fast, if you do approx more than 2 requests per minute, you have to wait some time again... - they also have an official api at api.semanticscholar.org, but it's ratelimits are even harder Closes: https://github.com/searxng/searxng/issues/4685
2025-05-02[feat] engine ChinaSo: support source filter for ChinaSo-NewsBrandonStudio
* filtering ChinaSo-News results by source, option ``chinaso_news_source`` * add ChinaSo engine to the online docs https://docs.searxng.org/dev/engines/online/chinaso.html * fix SearXNG categories in the settings.yml * deactivate ChinaSo engines ``inactive: true`` until [1] is fixed * configure network of the ChinaSo engines [1] https://github.com/searxng/searxng/issues/4694 Signed-off-by: @BrandonStudio Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-30[fix] brave: fix images and videos enginesBnyro
2025-04-29[fix] pdia: dynamically fetch API key config file locationDenperidge
As suggested by @Bnyro at https://github.com/searxng/searxng/pull/4652#discussion_r2055760390 !
2025-04-29[fix] engine yahoo: replace fetch_traits by a list of languagesMarkus Heiser
The Yahoo engine's fetch_traits function has been encountering an error in CI jobs for several months [1], thus aborting the process for all other engines as well. The language selection dialog (which fetch_traits calls) requires an `EuConsent` cookie. Strangely, the cookie is not needed for searching, which is why the engine itself still works. Since Yahoo won't be conquering any new marketplaces in the foreseeable future, it should be sufficient to hard-implement the list of currently available languages ​​(`yahoo_languages`). [1] https://github.com/searxng/searxng/actions/runs/14720458830/job/41313149268 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-24[fix] fix Quark engine callingZhijie He
2025-04-23[fix] typo in soundcloud engineMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-23[fix] engine: re-implement mullvad leta integrationGrant Lanham
Re-writes the Mullvad Leta integration to work with the new breaking changes. Mullvad Leta is a search engine proxy. Currently Leta only offers text search results not image, news or any other types of search result. Leta acts as a proxy to Google and Brave search results. - Remove docstring comments regarding requiring the use of Mullvad VPN, which is no longer a hard requirement. - configured two engines: ``mullvadleta`` (uses google) and ``mullvadleta brave`` (uses brave) - since leta may not provide up-to-date search results, both search engines are disabled by default. .. hint:: Leta caches each search for up to 30 days. For example, if you use search terms like ``news``, contrary to your intention you'll get very old results! Co-authored-by: Markus Heiser <markus.heiser@darmarit.de> Signed-off-by: Grant Lanham <contact@grantlanham.com>
2025-04-18[feat] engine: add Steam engineZhijie He
2025-04-17[feat] engines: add Hugging Face engineZhijie He
2025-04-17[feat] engine: add engine for italian press agency ansaTommaso Colella
2025-04-17[feat] add SensCritique (FR) engineRobinFrcd
Closes: https://github.com/searxng/searxng/issues/4623
2025-04-12[feat] engine: add microsoft learn engineTommaso Colella
2025-04-11[fix] engine dokuwiki: basedir duplicationgrasdk
Dokuwiki searches behind reverse proxy had duplicate base path in the url, creating a wrong url. This patch exchanges string concat of URLs with urljoin [1] from urllib.parse. This eliminates the dual problem, while retaining the old functionality designed to concatenate protocol, hostname and port (as base_url) with path. [1] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin Closes: https://github.com/searxng/searxng/issues/4598
2025-04-09[fix] make docs - ERROR: Unknown target name: "auth_key"Markus Heiser
BTW: fix a bug with sys.path: repo-root (not util) needs to added to generate autodoc from scripts in ./searxng_extra Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-07[fix] Meilisearch engine: Authorization Token When Integrating MeilisearchMarkus Heiser
`X-Meili-API-Key` has been changed to `Authorization` [1] [1] https://www.meilisearch.com/docs/reference/api/overview#authorization Suggested-by: https://github.com/searxng/searxng/issues/4416#issuecomment-2781254841 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-06[fix] engine radio browser: get servers from DNS api.radio-browser.infoMarkus Heiser
Do a DNS-lookup of 'all.api.radio-browser.info', add reverse lookup and select randomly a URL from available servers Closes: https://github.com/searxng/searxng/issues/4576 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-04-01[fix] hardening against arguments of type None, where str or dict is expectedMarkus Heiser
On a long-running server, the tracebacks below can be found (albeit rarely), which indicate problems with NoneType where a string or another data type is expected. result.img_src:: File "/usr/local/searxng/searxng-src/searx/templates/simple/result_templates/images.html", line 13, in top-level template code <img src="" data-src="{{ image_proxify(result.img_src) }}" alt="{{ result.title|striptags }}">{{- "" -}} ^ File "/usr/local/searxng/searxng-src/searx/webapp.py", line 284, in image_proxify if url.startswith('//'): ^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'startswith' result.content:: File "/usr/local/searxng/searxng-src/searx/result_types/_base.py", line 105, in _normalize_text_fields result.content = WHITESPACE_REGEX.sub(" ", result.content).strip() ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'NoneType' html_to_text, when html_str is a NoneType:: File "/usr/local/searxng/searxng-src/searx/engines/wikipedia.py", line 190, in response title = utils.html_to_text(api_result.get('titles', {}).get('display') or api_result.get('title')) File "/usr/local/searxng/searxng-src/searx/utils.py", line 158, in html_to_text html_str = html_str.replace('\n', ' ').replace('\r', ' ') ^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'replace' presearch engine, when json_resp is a NoneType:: File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 221, in response results = parse_search_query(json_resp.get('results')) File "/usr/local/searxng/searxng-src/searx/engines/presearch.py", line 161, in parse_search_query for item in json_results.get('specialSections', {}).get('topStoriesCompact', {}).get('data', []): ^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-30[feat] engines: add Ollama engineZhijie He
2025-03-30[feat] engines: add reuters news engineBnyro
2025-03-30[feat] engine: add engine for italian online newspaper "il post"Tommaso Colella
2025-03-30[feat] engines: add Quark engineZhijie He
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30[feat] engines: add Niconico videos engineZhijie He
Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-03-30[feat] engine: add bitchutenaughtymommy42069
2025-03-28[fix] presearch engine: Unexpected crash if duration not in videosAadniz
2025-03-27[fix] make docs -> ERROR: Unknown target name: "google: max 50 pages".Markus Heiser
Fix the issues reported by sphinx build:: docstring of searx.engines.google.max_page:1: ERROR: Unknown target name: "google: max 50 pages". docstring of searx.engines.google_images.max_page:1: ERROR: Unknown target name: "google: max 50 pages". docstring of searx.engines.google_scholar.max_page:1: ERROR: Unknown target name: "google: max 50 pages". Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27[fix] baidu engine: properly decoding HTML escape codesAadniz
2025-03-25[refactor] duration strings: move parsing logic to utils.pyBnyro