update ATK scrape to handle empty headnote
This commit is contained in:
parent
2f27413c0a
commit
7930c2417c
@ -46,8 +46,12 @@ class CooksIllustrated(AbstractScraper):
|
|||||||
def instructions(self):
|
def instructions(self):
|
||||||
if not self.recipe:
|
if not self.recipe:
|
||||||
self.get_recipe()
|
self.get_recipe()
|
||||||
|
if 'headnote' in self.recipe:
|
||||||
|
i = ['Note: ' + self.recipe.get('headnote', '')]
|
||||||
|
else:
|
||||||
|
i = []
|
||||||
return "\n".join(
|
return "\n".join(
|
||||||
['Note: ' + self.recipe.get('headnote', '')]
|
i
|
||||||
+ [self.recipe['whyThisWorks']]
|
+ [self.recipe['whyThisWorks']]
|
||||||
+ [
|
+ [
|
||||||
instruction['fields']['content']
|
instruction['fields']['content']
|
||||||
|
Loading…
Reference in New Issue
Block a user