forked from Ponysearch/Ponysearch
[fix] chefkoch: use German words in content field
This commit is contained in:
parent
ffb1001f80
commit
60a373ad89
1 changed files with 7 additions and 10 deletions
|
@ -46,23 +46,20 @@ def response(resp):
|
||||||
if recipe['submissionDate']:
|
if recipe['submissionDate']:
|
||||||
publishedDate = datetime.strptime(result['recipe']['submissionDate'][:19], "%Y-%m-%dT%H:%M:%S")
|
publishedDate = datetime.strptime(result['recipe']['submissionDate'][:19], "%Y-%m-%dT%H:%M:%S")
|
||||||
|
|
||||||
content = (
|
content = [
|
||||||
"difficulity: "
|
f"Schwierigkeitsstufe (1-3): {recipe['difficulty']}",
|
||||||
+ str(recipe['difficulty'])
|
f"Zubereitungszeit: {recipe['preparationTime']}min",
|
||||||
+ " / preparation time: "
|
f"Anzahl der Zutaten: {recipe['ingredientCount']}",
|
||||||
+ str(recipe['preparationTime'])
|
]
|
||||||
+ "min / ingredient count: "
|
|
||||||
+ str(recipe['ingredientCount'])
|
|
||||||
)
|
|
||||||
|
|
||||||
if recipe['subtitle']:
|
if recipe['subtitle']:
|
||||||
content = f"{recipe['subtitle']} / {content}"
|
content.insert(0, recipe['subtitle'])
|
||||||
|
|
||||||
results.append(
|
results.append(
|
||||||
{
|
{
|
||||||
'url': recipe['siteUrl'],
|
'url': recipe['siteUrl'],
|
||||||
'title': recipe['title'],
|
'title': recipe['title'],
|
||||||
'content': content,
|
'content': " | ".join(content),
|
||||||
'thumbnail': recipe['previewImageUrlTemplate'].replace("<format>", thumbnail_format),
|
'thumbnail': recipe['previewImageUrlTemplate'].replace("<format>", thumbnail_format),
|
||||||
'publishedDate': publishedDate,
|
'publishedDate': publishedDate,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue