- Should resolve#6819 by reverting Accept-Encoding headers back to the curl_cffi default value
- Adds IIFE Parsing / Data Extraction that appears after headers update
If the provider uses DDG, and a HEX color code is searched for (for example, `A87771`), it directly reports `SearxEngineXPathException: index 0 not found` (the Web UI displays a parsing error), because DDG displays an icon for a color code. This causes the parser to be unable to parse that icon. This fix directly ignores this special function.
- Changes the path of the /image_proxy endpoint to /image. This ensures that if the user copies the image through the browser, it is named image.png rather than image_proxy.png as the latter can be attributed to searxng hence preserving the privacy of the user.
- Removed the dedicated network for the image proxy. Previously this was used to force http/2 off but since moving to curl from httpx this is not as much of a problem. Now instead uses the default network.
Signed-off-by: vojkovic <git@vojk.au>
Move hardcoded English strings of the hotkeys help (keyboard.ts) to the
server side get_translations() so translators can pick them up. The client
looks them up via settings.translations with identical English fallbacks.
Wikidata kept showing up in `unresponsive_engines` as "unexpected crash", but only for some queries (`!wikidata loi anti gaspillage` for instance).
In `get_results`, `itemDescription` defaults to `[]`. When an entity has no description and `display_type` contains `"list"`, that empty list goes out as the `content` of a list result, and `ResultContainer.extend` fails with `TypeError: expected string or bytes-like object, got 'list'`. Every wikidata result of the query is dropped with it.
The default is now an empty string. `len(infobox_content) == 0` still works, and the infobox branch already expected a string.
`tests/unit/test_engine_wikidata.py` covers an entity with no description, once with `display_type` `["list"]` and once with `["infobox"]`. Without the fix both tests fail (`'content': []` instead of `''`), with it both pass.
itemDescription defaulted to [] in get_results. With "list" in display_type, that empty list was sent as the content of a list result and ResultContainer.extend raised a TypeError, so the whole wikidata answer of the query was lost. Default to an empty string instead.
Signed-off-by: Guillaume PUTIER <putier.guillaume@gmail.com>
Co-authored-by: Guillaume PUTIER <putier.guillaume@gmail.com>
Often there will be two or more results in the infobox.
We now sort this so infoboxes with an image show above those that do not.
Signed-off-by: vojkovic <git@vojk.au>
- parse s1search suggestions
- thereby also fixes that some queries would crash the engine if using `https://search.nation.online` as base url because it tried to parse the suggestions as real results
### How to test this PR locally?
- set `base_url = "https://search.nation.online"` and `inactive: false`
- !s1 rust
Added Sec-Fetch-Mode header to fix the engine. Dogpile now has better bot detection, similar to tusksearch, we now require CORS headers in the request.
- The 'engine tokens' field is only shown now if there are any engines with tokens configured.
- DOI Resolver now has combined the previous two settings (one dropdown and one toggle) into just a single dropdown similar to the favicon resolver.
Add support for xprivo.com. Xprivo has a rate-limit of smth like 20 requests
per day without an API key. However, if you use a proxy like the IPv6 rotating
proxy [1] you basically get unlimited requests.
[1] https://github.com/vojkovic/http-proxy-ipv6-pool-docker
Many engines use the JSON results from Brave (e.g. Brave, BraveAPI, Tusksearch
and more), so the result parsing logic is always the same. This PR deduplicates
this code.
* [docs] indicate modification of settings.yml is necessary to add new plugin + small exemple code correction
* [docs] plugins: add more details about adding new plugins
Icons are provided for the main categories known to us.
The distinction between CATEGORY_GROUPS and CATEGORY_NAMES is abandoned in favor
of the latter.
HINT: we need single-color icons; transparent background and the color must be
`currentColor` so that the icons can be used in light/dark themes.
The following SVGs from the ionicons had to be revised (use ``currentColor``).
- client/simple/src/svg/ionicons/logo-rss.svg
- client/simple/src/svg/ionicons/radio-outline.svg
- client/simple/src/svg/ionicons/color-palette-outline.svg
For the following categories, I did not find any usable icons in Ionicons; new
SVGs were created for these categories.
- onions: client/simple/src/svg/ionicons/tor-browser.svg
- lyrics: client/simple/src/svg/ionicons/song-lyric-music.svg [1]
- packages: client/simple/src/svg/ionicons/package_2.svg [1]
[1] Based on Google's Material icons: https://fonts.google.com/icons
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Deletes thumbnails instead of showing an error image and also moves them to the right side. Also gives them a background and makes them into rounded 4:3 rectangles for better ui.