summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2024-05-09 16:06:30 +0200
committerBnyro <bnyro@tutanota.com>2024-05-12 18:36:49 +0200
commit60a373ad895360ccd0b2830ffa41cdc5aa737949 (patch)
treefba1b08563089d770936d3c637ff9c4aaf428189
parentffb1001f803359a590bbbaf62da6b1fa1456ed16 (diff)
downloadsearx-master.tar.gz
searx-master.zip
[fix] chefkoch: use German words in content fieldHEADmaster
-rw-r--r--searx/engines/chefkoch.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/searx/engines/chefkoch.py b/searx/engines/chefkoch.py
index cffa59a0f..504b45152 100644
--- a/searx/engines/chefkoch.py
+++ b/searx/engines/chefkoch.py
@@ -46,23 +46,20 @@ def response(resp):
if recipe['submissionDate']:
publishedDate = datetime.strptime(result['recipe']['submissionDate'][:19], "%Y-%m-%dT%H:%M:%S")
- content = (
- "difficulity: "
- + str(recipe['difficulty'])
- + " / preparation time: "
- + str(recipe['preparationTime'])
- + "min / ingredient count: "
- + str(recipe['ingredientCount'])
- )
+ content = [
+ f"Schwierigkeitsstufe (1-3): {recipe['difficulty']}",
+ f"Zubereitungszeit: {recipe['preparationTime']}min",
+ f"Anzahl der Zutaten: {recipe['ingredientCount']}",
+ ]
if recipe['subtitle']:
- content = f"{recipe['subtitle']} / {content}"
+ content.insert(0, recipe['subtitle'])
results.append(
{
'url': recipe['siteUrl'],
'title': recipe['title'],
- 'content': content,
+ 'content': " | ".join(content),
'thumbnail': recipe['previewImageUrlTemplate'].replace("<format>", thumbnail_format),
'publishedDate': publishedDate,
}