mirror of
https://github.com/searxng/searxng.git
synced 2026-07-17 21:41:24 +00:00
[feat] engines: add google cse engine (#6364)
Adds a new google cse engine as an alternative to the currently broken html google engine. It works by generating a token which is cached for 1 hour and it only uses the public CSE id from blackle.com. We do have two others but I think just hardcoding one will be enough. Will be broken in 2027 due to google deprecating it but I it will be good while it lasts. I found I can get up to 20 results per page. Setting safesearch and language works and I just copied the traits from the google engine. Also set old google engine as inactive as it is completely broken for now.
This commit is contained in:
@@ -131,8 +131,8 @@ def fetch_traits_map() -> EngineTraitsMap:
|
||||
def filter_locales(traits_map: EngineTraitsMap) -> set[str]:
|
||||
"""Filter language & region tags by a threshold."""
|
||||
|
||||
min_eng_per_region = 18
|
||||
min_eng_per_lang = 23
|
||||
min_eng_per_region = 19
|
||||
min_eng_per_lang = 24
|
||||
|
||||
_: dict[str, int] = {}
|
||||
for eng in traits_map.values():
|
||||
|
||||
Reference in New Issue
Block a user