Open jayaddison opened 3 weeks ago
The get_yields util could be adjusted to handle trailing* letters or words after the quantity and print the full unit.
so 750g
would be returned as 750 grams
. Could be implemented to only take the characters trailing the unit or the next word and apply strict comparison against an existing list of common weights / measurements.
That's probably a good idea. I'll outline my thought process about it:
1 CL
for example in Slovakian meaning one spoon, not one centilitre.So I'm +0.5 on this - basically, proceeding cautiously with a list of widely-accepted international standard units that are commonly used in recipe ingredient descriptions.
That's probably way more of a verbose explanation than necessary -- but these are the kind of factors I'm trying to balance, and the lack of an explanation might be even more confusing.
Pre-filing checks
The URL of the recipe(s) that are not being scraped correctly
The results you expect to see
The output quantity of the recipe described on the page is 750g ("750 g di crema pasticcera"), so a
yields
value that corresponds to that is expected.The results (including any Python error messages) that you are seeing