This commit is contained in:
Michael Poluektov
2024-11-21 17:52:19 +00:00
parent 6783c98539
commit e1a85c99ab
2 changed files with 5 additions and 4 deletions
@@ -22,7 +22,7 @@ def search_mojeek(
headers = {
"Accept": "application/json",
}
params = {"q": query, "api_key": api_key, 'fmt': 'json', 't': count}
params = {"q": query, "api_key": api_key, "fmt": "json", "t": count}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
@@ -32,10 +32,9 @@ def search_mojeek(
if filter_list:
results = get_filtered_results(results, filter_list)
return [
SearchResult(
link=result["url"], title=result.get("title"), snippet=result.get("desc")
)
for result in results
]
]