mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
5.59k stars 608 forks source link

fix: Make OpenAI Image Scraping More Fault Tolerant #3749

Closed michael-genson closed 1 week ago

michael-genson commented 1 week ago

What type of PR is this?

(REQUIRED)

(REQUIRED)

Currently, if there's an error when trying to choose an image during OpenAI scraping, the recipe fails to scrape. This adds some try/except logic to ignore this, since images aren't required.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes issue commented on https://github.com/mealie-recipes/mealie/discussions/3644#discussioncomment-9807196

Testing

(fill-in or delete this section)

Tested on https://ottolenghi.co.uk/recipes/pork-souvlaki-with-cucumber-salad-and-tzatziki, before and after the changes.