Recipe - Food - Nutrition

FREEMIUM
Verified
Door David | Bijgewerkt 14 days ago | Food
Populariteit

9.9 / 10

Latency

485ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle discussies

Parsing Ingredients Error When ¼ and ½ Symbols Used

Rapid account: Tfevens
tfevens
2 years ago

Extracting the recipe from https://sugarspunrun.com/peanut-butter-chocolate-chip-pancakes#recipe shows the ingredients detail incorrectly, as the site uses single character symbols for ¼ and ½ measurements.

For example, the amount of sugar given in the source recipe is ¼ cup and the API result shows the following JSON:

{
“id”: 19335,
“aisle”: “Baking”,
“image”: “sugar-in-bowl.png”,
“consistency”: “solid”,
“name”: “� sugar”,
“nameClean”: “sugar”,
“original”: “� cup sugar”,
“originalName”: “� sugar”,
“amount”: 1.0,
“unit”: “cup”,
“meta”: [],
“measures”: {
“us”: {
“amount”: 1.0,
“unitShort”: “cup”,
“unitLong”: “cup”
},
“metric”: {
“amount”: 236.588,
“unitShort”: “ml”,
“unitLong”: “milliliters”
}
}

Any advice on how to correct, or deal with the inaccuracy in data?

Thanks!

Rapid account: Tfevens
tfevens Commented 2 years ago

Just want to come back and mention that the issue has been resolved in my testing - thanks!!

Rapid account: Spoonacular
spoonacular Commented 2 years ago

Thanks, we are working on this and expect a fix by the end of the month.

Rapid account: Tfevens
tfevens Commented 2 years ago

Not sure if this will help,or confuse things more - but the URL below also uses ½ and ¼ in the ingredients, but they are being handled without error.

https://nowcookthis.com/butter-baked-haddock/

{
			"id": 1001,
			"aisle": "Milk, Eggs, Other Dairy",
			"image": "butter-sliced.jpg",
			"consistency": "solid",
			"name": "butter",
			"nameClean": "butter",
			"original": "½ cup melted butter",
			"originalName": "melted butter",
			"amount": 0.5,
			"unit": "cup",
			"meta": [
				"melted"
			],
			"measures": {
				"us": {
					"amount": 0.5,
					"unitShort": "cups",
					"unitLong": "cups"
				},
				"metric": {
					"amount": 118.294,
					"unitShort": "ml",
					"unitLong": "milliliters"
				}
			}
		},
		{
			"id": 9150,
			"aisle": "Produce",
			"image": "lemon.png",
			"consistency": "solid",
			"name": "lemon",
			"nameClean": "lemon",
			"original": "¼ large lemon",
			"originalName": "lemon",
			"amount": 0.25,
			"unit": "large",
			"meta": [],
			"measures": {
				"us": {
					"amount": 0.25,
					"unitShort": "large",
					"unitLong": "larges"
				},
				"metric": {
					"amount": 0.25,
					"unitShort": "large",
					"unitLong": "larges"
				}
			}
		},
Rapid account: Spoonacular
spoonacular Commented 2 years ago

We will look into this and get back to you soon. Thanks for reporting!

Rapid account: Tfevens
tfevens Commented 2 years ago

Any updates?

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen