hhursev / recipe-scrapers

Python package for scraping recipes data
MIT License
1.62k stars 508 forks source link

nutrients: empty strings are included in nutrient output #1001

Closed jayaddison closed 4 months ago

jayaddison commented 5 months ago

Pre-filing checks

The URL of the recipe(s) that are not being scraped correctly

...

The results you expect to see We filter-out nutrients that have empty (none) values, and we may want to do something similar for other nutrient values too.

The only schema.org NutritionInformation property that could match an empty string seems to be servingSize: https://www.schema.org/NutritionInformation - the others are generally of the form <quantity> <unit> (as with Mass and Energy).

...

The results (including any Python error messages) that you are seeing

Our nutrient extraction logic allows empty strings in returned nutrient values, and some tests have matching expectations. ...