Remove double-parentheses from thewoksoflife

This commit is contained in:
jerjou 2020-07-17 14:44:23 -04:00
parent c88648690b
commit ceaa56c95b

View file

@ -3,4 +3,11 @@ import json
from parsers.recipe import WpJsonRecipe
class Thewoksoflife(WpJsonRecipe):
pass
def get_json_recipe(self, d):
recipe = super().get_json_recipe(d)
# thewoksoflife.com for some reason has double parentheses in its
# ingredients. Remove them.
recipe['ingredients'] = [
ingredient.replace('((', '(').replace('))', ')')
for ingredient in recipe.get('ingredients', [])]
return recipe