Fix after rebase

This commit is contained in:
smilerz
2021-04-16 11:17:00 -05:00
parent a69fb4922d
commit 2ecc0ab680
12 changed files with 48 additions and 67 deletions

View File

@@ -15,8 +15,8 @@ def get_from_scraper(scrape, space):
recipe_json = {}
try:
recipe_json['name'] = scrape.title()
except TypeError:
recipe_json['name'] = parse_name(scrape.title() or scrape.schema.data.get('name') or '')
except (TypeError, AttributeError):
recipe_json['name'] = ''
try:

View File

@@ -46,11 +46,12 @@ class CooksIllustrated(AbstractScraper):
def instructions(self):
if not self.recipe:
self.get_recipe()
return "\n".join([self.recipe['whyThisWorks']] +
[
instruction['fields']['content']
for instruction in self.recipe['instructions']
]
return "\n".join(
[self.recipe['whyThisWorks']]
+ [
instruction['fields']['content']
for instruction in self.recipe['instructions']
]
)
def nutrients(self):