Fix double-parentheses
This commit is contained in:
parent
51b132e742
commit
7405ba57f9
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,12 @@
|
|||
from parsers.recipe import WpJsonRecipe
|
||||
|
||||
class Minimalistbaker(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('))', ')').replace('//', '/')
|
||||
for ingredient in recipe.get('ingredients', [])]
|
||||
return recipe
|
||||
|
|
Loading…
Reference in a new issue