The use of img_src AND thumbnail in the default results makes no sense (only a
thumbnail is needed). In the current state this is rather confusing, because
img_src is displayed like a thumbnail (small) and thumbnail is displayed like an
image (large).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The names of the links are rather tags than real names, and they sometimes vary
greatly in their spelling:
- GitHub: github, Github
- Source code: Repository, SCM, Project Source Code
- Documentation: docs, Documentation
It was standardized to terms such as 'Source code' and 'Documentation', as
translations already exist for these terms.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This patch is a leftover from [1] in which the WIKIDATA_UNITS values has become
a dictionary.
[1] https://github.com/searxng/searxng/pull/3378
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
- l10n support: parse and format decimal numbers by babel
- ability to add additional units
- improved unit detection (symbols are not unique)
- support for alias units (0,010C to F --> 32,018 °F)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Startpage has changed its HTML layout, classes like ``w-gl__result__main`` do no
longer exists and the result items have been slightly changed in their
structure.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Previously only result urls were set to open in new tab by default, this should
make the behaviour consistent.
Also adds the missing rel="noreferrer" to the anchor tag. Although this should
not be needed as long as the `referrer-policy: no-referrer` header is set, it's
always nice to play safer than to have to say sorry. For example some reverse
proxy configurations might strip off unwhitelisted headers in which case it's
nice to have this set.
Sometimes the URL prefix switches from a http to a https, this patch harden the
code that removes the URL prefix from wikidata Q-name, issue has been reported
in [1].
[1] https://github.com/searxng/searxng/pull/3437#issuecomment-2082121730
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
In the "Engines" tab on searx.space [1] nearly all engines report a
TimeoutException: yep engine
As documented in issue #2444 [2], this problem can be fixed by increasing the
timeout. Note: on a local instance (`make run`) the timeout of 3sec was
sufficient / at least in my local test, but the balance of searx.space leads me
to believe that this tight timeout is usually not sufficient.
[1] https://searx.space/
[2] https://github.com/searxng/searxng/issues/2444
Closes https://github.com/searxng/searxng/issues/3421
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
CCC media serves several recording formats, to name a few:
- application/x-subrip
- video/mp4
- video/webm
- audio/mpeg
- audio/opus
- audio/mpeg
not all of them are suitable for a video frame. If available we should prefer
video/mp4 due to its minimal data rates.
Closes: https://github.com/searxng/searxng/issues/3431
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
To test this patch I used .. and checked the diff of the `messages.pot` file::
$ ./manage pyenv.cmd pybabel extract -F babel.cfg \
-o ./searx/translations/messages.pot searx/
$ git diff ./searx/translations/messages.pot
----
hint from @dalf: f-string are not supported [1] but there is no error [2].
[1] python-babel/babel#594
[2] python-babel/babel#715
Closes: https://github.com/searxng/searxng/issues/3412
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
`youtube_api.py` throws an exception if the search results contain a channel, as
channels have no videoId. This PR adds a keycheck for parsing the json response.