#NEWLINE# def parse_recipe( scope , data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# root = select_class ( scope , 'hrecipe' ) #NEWLINE# data [ 'name' ] = select_class ( root , 'fn' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'yield' ] = select_class ( root , 'yield' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'published' ] = select_class ( root , 'published' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'description' ] = select_class ( root , 'summary' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'duration' ] = select_class ( root , 'duration' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'prepTime' ] = select_class ( root , 'preptime' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'cookTime' ] = select_class ( root , 'cooktime' ) . select ( './/text()' ) . extract ( ) #NEWLINE# data [ 'ingredients' ] = [ ] #NEWLINE# for ingredient in select_class ( root , 'ingredient' ) : #NEWLINE# #INDENT# data [ 'ingredients' ] . append ( '' . join ( ingredient . select ( './/text()' ) . extract ( ) ) ) #NEWLINE# #UNINDENT# return data