From fb1de15de6f94fdbd7506a98d6f27769f964e831 Mon Sep 17 00:00:00 2001 From: liam Date: Mon, 7 Jul 2025 20:38:16 +0000 Subject: [PATCH] cookbook app: only import the first valid image --- cookbook/integration/cookbookapp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cookbook/integration/cookbookapp.py b/cookbook/integration/cookbookapp.py index 12c5818c6..d143d00d4 100644 --- a/cookbook/integration/cookbookapp.py +++ b/cookbook/integration/cookbookapp.py @@ -62,10 +62,11 @@ class CookBookApp(Integration): try: for url in images: - # import all valid images which are not cookbookapp logos + # import the first valid image which is not cookbookapp branding if validate_import_url(url) and not url.startswith("https://media.cookbookmanager.com/brand/"): response = requests.get(url) self.import_recipe_image(recipe, BytesIO(response.content)) + break except Exception as e: print('failed to import image ', str(e))