Remove double-parentheses from thewoksoflife
This commit is contained in:
parent
c88648690b
commit
ceaa56c95b
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue