fix ATK scraper

This commit is contained in:
smilerz 2021-04-19 14:37:26 -05:00
parent ae3835b541
commit 0f4cd4b17c

View File

@ -46,13 +46,13 @@ class CooksIllustrated(AbstractScraper):
def instructions(self):
if not self.recipe:
self.get_recipe()
if 'headnote' in self.recipe:
if self.recipe.get('headnote', False):
i = ['Note: ' + self.recipe.get('headnote', '')]
else:
i = []
return "\n".join(
i
+ [self.recipe.get('whyThisWorks','')]
+ [self.recipe.get('whyThisWorks', '')]
+ [
instruction['fields']['content']
for instruction in self.recipe['instructions']