mirror of
https://github.com/searxng/searxng
synced 2024-10-30 21:20:28 +00:00
[fix] chefkoch: use German words in content field
This commit is contained in:
parent
58320222e2
commit
bb4b6a6911
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user