Skip to content

Commit

Permalink
[fix] chefkoch: use German words in content field
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed May 12, 2024
1 parent ffb1001 commit 60a373a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions searx/engines/chefkoch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 60a373a

Please sign in to comment.