From 453b5c9dacc9048397339e944e020351616588e8 Mon Sep 17 00:00:00 2001 From: James Addison Date: Thu, 11 Jul 2024 14:08:41 +0100 Subject: [PATCH] Reapply "Language: consistency: retrieve dynamically from HTML where possible. (#1112)" This reverts commit d12320fe36fd63826016e3990f3b0493b79043b7. --- recipe_scrapers/_abstract.py | 9 +- recipe_scrapers/kuchynalidla.py | 2 +- recipe_scrapers/lekkerensimpel.py | 2 +- recipe_scrapers/woolworths.py | 3 +- tests/legacy/test_data/woolworths.testhtml | 757 ++++++++++++++++++++- tests/legacy/test_data/woolworths.testjson | 2 + tests/legacy/test_woolworths.py | 54 +- 7 files changed, 796 insertions(+), 33 deletions(-) create mode 100644 tests/legacy/test_data/woolworths.testjson diff --git a/recipe_scrapers/_abstract.py b/recipe_scrapers/_abstract.py index 78588c89a..f7102b916 100644 --- a/recipe_scrapers/_abstract.py +++ b/recipe_scrapers/_abstract.py @@ -9,6 +9,7 @@ from recipe_scrapers.settings import settings +from ._exceptions import ElementNotFoundInHtml from ._grouping_utils import IngredientGroup from ._schemaorg import SchemaOrg @@ -117,7 +118,8 @@ def language(self): """Language the recipe is written in.""" candidate_languages = OrderedDict() html = self.soup.find("html", {"lang": True}) - candidate_languages[html.get("lang")] = True + if html: + candidate_languages[html.get("lang")] = True # Deprecated: check for a meta http-equiv header # See: https://www.w3.org/International/questions/qa-http-and-lang @@ -138,7 +140,10 @@ def language(self): candidate_languages.pop("en", None) # Return the first candidate language - return candidate_languages.popitem(last=False)[0] + if candidate_languages: + return candidate_languages.popitem(last=False)[0] + else: + raise ElementNotFoundInHtml("Could not find language.") def ingredients(self): """Ingredients of the recipe.""" diff --git a/recipe_scrapers/kuchynalidla.py b/recipe_scrapers/kuchynalidla.py index 501cb29a7..d3ca6f9af 100644 --- a/recipe_scrapers/kuchynalidla.py +++ b/recipe_scrapers/kuchynalidla.py @@ -68,4 +68,4 @@ def instructions_list(self): return il def language(self): - return "sk" + return super().language() diff --git a/recipe_scrapers/lekkerensimpel.py b/recipe_scrapers/lekkerensimpel.py index 8a7d1c7e2..c5b61b9c9 100644 --- a/recipe_scrapers/lekkerensimpel.py +++ b/recipe_scrapers/lekkerensimpel.py @@ -70,4 +70,4 @@ def description(self): return description["content"] if description else None def language(self): - return "nl-NL" + return super().language() diff --git a/recipe_scrapers/woolworths.py b/recipe_scrapers/woolworths.py index 5630a0cca..b51447c77 100644 --- a/recipe_scrapers/woolworths.py +++ b/recipe_scrapers/woolworths.py @@ -2,7 +2,6 @@ import requests from ._abstract import HEADERS, AbstractScraper -from ._exceptions import StaticValueException from ._schemaorg import SchemaOrg from ._utils import url_path_to_dict @@ -40,7 +39,7 @@ def nutrients(self): return self.schema.nutrients() def language(self): - raise StaticValueException(return_value="en-AU") + return super().language() def site_name(self): return "Woolworths | Fresh Ideas For You" diff --git a/tests/legacy/test_data/woolworths.testhtml b/tests/legacy/test_data/woolworths.testhtml index b529617f0..a709c2f92 100644 --- a/tests/legacy/test_data/woolworths.testhtml +++ b/tests/legacy/test_data/woolworths.testhtml @@ -1 +1,756 @@ -{"title":"Asparagus Salad With Lemon Vinaigrette","lastModifiedDate":1637043243490,"designPath":"/libs/settings/wcm/designs/default","brandSlug":"","componentsResourceTypes":["woolworths-foodhub/components/content/ingredients","woolworths-foodhub/components/content/description","woolworths-foodhub/components/content/container","woolworths-foodhub/components/content/nutritional-facts","woolworths-foodhub/components/content/separator","woolworths-foodhub/components/content/smart-link","woolworths-foodhub/components/content/byline","nt:unstructured","woolworths-foodhub/components/structure/recipePage","woolworths-foodhub/components/content/summary-panel","woolworths-foodhub/components/content/disclaimer","woolworths-foodhub/components/content/images","woolworths-foodhub/components/content/methods","woolworths-foodhub/components/content/breadcrumb","wcm/foundation/components/responsivegrid","woolworths-foodhub/components/content/rating-review","woolworths-foodhub/components/content/title","woolworths-foodhub/components/content/recipe-seo-data","woolworths-foodhub/components/content/categories-panel","woolworths-foodhub/components/content/recipe-collection"],"templateName":"spa-page-template1","cssClassNames":"recipePage page basicpage","language":"en",":type":"woolworths-foodhub/components/structure/recipePage",":itemsOrder":["root","ingredientList","methodList","imagesList"],":items":{"root":{"columnCount":12,"columnClassNames":{"container":"aem-GridColumn aem-GridColumn--default--12","breadcrumb":"aem-GridColumn aem-GridColumn--default--12","recipe_seo_data":"aem-GridColumn aem-GridColumn--default--12","container_49734716":"aem-GridColumn aem-GridColumn--default--12","container_1633042362":"aem-GridColumn aem-GridColumn--default--12","container_973633552":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["breadcrumb","container","container_49734716","container_1633042362","container_973633552","recipe_seo_data"],":items":{"breadcrumb":{"breadcrumbs":[{"name":"Home","url":"/"},{"name":"Recipes","url":"/shop/recipes"},{"name":"Salads","url":"/shop/recipes/collections/meal-type/salads"},{"name":"Asparagus Salad With Lemon Vinaigrette","url":""}],"itemListElement":[{"position":1,"name":"Home","item":"/","@type":"ListItem"},{"position":2,"name":"Recipes","item":"/shop/recipes","@type":"ListItem"},{"position":3,"name":"Salads","item":"/shop/recipes/collections/meal-type/salads","@type":"ListItem"},{"position":4,"name":"Asparagus Salad With Lemon Vinaigrette","@type":"ListItem"}],":type":"woolworths-foodhub/components/content/breadcrumb"},"container":{"backgroundColor":"#FFFFFF","disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"cqItemsOrder":["c1","c2","c3","c4","columnControlOptions"],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container","cqItems":{"c1":{"columnCount":12,"columnClassNames":{"container":"aem-GridColumn aem-GridColumn--default--12","images":"aem-GridColumn aem-GridColumn--default--12","title":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["title","container","images"],":items":{"title":{"title":"Asparagus Salad With Lemon Vinaigrette","titleAlignment":"middle",":type":"woolworths-foodhub/components/content/title"},"container":{"backgroundColor":"#FFFFFF","disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"6","smallMobileColumnOption":"12"},{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"6","smallMobileColumnOption":"12"}],"cqItemsOrder":["c1","c2","c3","c4","columnControlOptions"],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container/c1/container","cqItems":{"c1":{"columnCount":12,"columnClassNames":{"rating_review":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["rating_review"],":items":{"rating_review":{"reviewType":"","authorMode":false,"isRatingsAndReviews":true,":type":"woolworths-foodhub/components/content/rating-review"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnCount":12,"columnClassNames":{"byline":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["byline"],":items":{"byline":{"source":{"name":"Fresh Ideas","sourceUrl":"/shop/recipes/collections/partner/fresh-ideas","icon":"/content/dam/woolworths-foodhub/other-images-and-icons/recipe-source-images/icons-woolworths-fresh-ideas.png","sourceId":"FI","description":null,"imageBody":null,"imageHeader":"/content/dam/woolworths-foodhub/other-images-and-icons/fresh-ideas-logos/Woolworths-Fresh-Ideas-Primary-Stacked-CMYK_C.png","brandAttribution":null,"disclaimer":null,"isRatingsAndReviews":true,"ctaText":"Fresh Ideas recipes","listingUrl":null,"sourcePureUrl":"fresh-ideas"},":type":"woolworths-foodhub/components/content/byline"}},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"columnControlOptions":{":type":"nt:unstructured"}},":type":"woolworths-foodhub/components/content/container"},"images":{"imagesList":[{"imageId":null,"imageUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette?wid=1300&hei=1300","imageAlt":"Asparagus Salad With Lemon Vinaigrette","primary":"yes","presetType":null,"preset":null,"smartCrop":null,"imageDesktopCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Desktop-1300x658","imageMobileCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Mobile-1300x1150","squareCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Square-1300x1300"}],":type":"woolworths-foodhub/components/content/images"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"columnControlOptions":{":type":"nt:unstructured"}},":type":"woolworths-foodhub/components/content/container"},"container_49734716":{"disableBottomMargin":false,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"cqItemsOrder":["c1","c2","c3","c4","columnControlOptions"],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_49734716","cqItems":{"c1":{"columnCount":12,"columnClassNames":{"summary_panel":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["summary_panel"],":items":{"summary_panel":{"print":true,"save":false,"issocial":true,"share":[{"shareMedia":"facebook","shareUrl":"https://www.facebook.com/sharer/sharer.php?u="},{"shareMedia":"pinterest","shareUrl":"https://pinterest.com/pin/create/bookmarklet/?url="}],"recipeTitle":"Asparagus Salad With Lemon Vinaigrette","summaryListItems":[{"totalTime":"15m","cookTime":"5m","prepTime":"10m","complexity":"3","variation":"prepTime","restTime":null,"serveDefault":"4","serveUpper":null,"serveSizeUnit":null,"ingredientsCount":12,"stepsCount":3,"prepTimeTitle":"Prep","cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null},{"totalTime":"15m","cookTime":"5m","prepTime":"10m","complexity":"3","variation":"cookTime","restTime":null,"serveDefault":"4","serveUpper":null,"serveSizeUnit":null,"ingredientsCount":12,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":"Cook","restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null},{"totalTime":"15m","cookTime":"5m","prepTime":"10m","complexity":"3","variation":"servesSize","restTime":null,"serveDefault":"4","serveUpper":null,"serveSizeUnit":null,"ingredientsCount":12,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":"Serves","serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null},{"totalTime":"15m","cookTime":"5m","prepTime":"10m","complexity":"3","variation":"complexity","restTime":null,"serveDefault":"4","serveUpper":null,"serveSizeUnit":null,"ingredientsCount":12,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":"Difficulty","ingredientsCountTitle":null,"stepsCountTitle":null}],"imagesList":{"imageId":null,"imageUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette?wid=1300&hei=1300","imageAlt":"Asparagus Salad With Lemon Vinaigrette","primary":"yes","presetType":null,"preset":null,"smartCrop":null,"imageDesktopCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Desktop-1300x658","imageMobileCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Mobile-1300x1150","squareCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Square-1300x1300"},":type":"woolworths-foodhub/components/content/summary-panel"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"columnControlOptions":{":type":"nt:unstructured"}},":type":"woolworths-foodhub/components/content/container"},"container_1633042362":{"disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"12","smallMobileColumnOption":"12"},{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"cqItemsOrder":["c1","c2","c3","c4","columnControlOptions"],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_1633042362","cqItems":{"c1":{"columnCount":12,"columnClassNames":{"nutritional_facts":"aem-GridColumn aem-GridColumn--default--12","ingredients":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["ingredients","nutritional_facts"],":items":{"ingredients":{"recipeTitle":"Asparagus Salad With Lemon Vinaigrette","whiskToken":"OvupLC3bOkkbbEzqatZA526kWNijke90UZ3opCHvOf9gTkgqBxmIxb61ecEPBIVh","ingredientTitle":"Ingredients","ingredientServings":"Number of servings","copyButtonText":"Copy text","copyButtonIcon":"iconAct-New_Window","addToListText":"Add to list","addToListIcon":"iconAct-Save_To_List","shopRecipeText":"Shop recipe","shopRecipeIcon":"iconShop-Cart-Outlined","ingredientList":[{"ingredientId":"0","ingredientName":"asparagus","ingredientGroup":null,"ingredientType":"M","measurement":"2","measurementUpper":null,"unit":"bunches","preparation":"trimmed, halved diagonally","productId":"132538","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"snow peas","ingredientGroup":null,"ingredientType":"M","measurement":"100","measurementUpper":null,"unit":"g","preparation":"trimmed, halved diagonally","productId":"145843","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"gem lettuce","ingredientGroup":null,"ingredientType":"M","measurement":"2","measurementUpper":null,"unit":null,"preparation":"trimmed, leaves separated","productId":"823690","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"radishes","ingredientGroup":null,"ingredientType":"M","measurement":"2","measurementUpper":null,"unit":null,"preparation":"trimmed, thinly sliced into rounds","productId":"147319","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"feta","ingredientGroup":null,"ingredientType":"M","measurement":"80","measurementUpper":null,"unit":"g","preparation":"crumbled","productId":"452083","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"small basil leaves","ingredientGroup":null,"ingredientType":"M","measurement":"0.5","measurementUpper":null,"unit":"cup","preparation":null,"productId":"133621","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"natural sliced almonds","ingredientGroup":null,"ingredientType":"M","measurement":"2","measurementUpper":null,"unit":"tbs","preparation":"toasted","productId":"726350","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"white wine vinegar","ingredientGroup":"Vinaigrette ","ingredientType":"P","measurement":"1","measurementUpper":null,"unit":"tbs","preparation":null,"productId":"256881","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"Dijon mustard","ingredientGroup":"Vinaigrette ","ingredientType":"M","measurement":"2","measurementUpper":null,"unit":"tsp","preparation":null,"productId":"368776","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"sea salt flakes","ingredientGroup":"Vinaigrette ","ingredientType":"P","measurement":"0.25","measurementUpper":null,"unit":"tsp","preparation":null,"productId":"77000","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"caster sugar","ingredientGroup":"Vinaigrette ","ingredientType":"M","measurement":"0.25","measurementUpper":null,"unit":"tsp","preparation":null,"productId":"720343","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null},{"ingredientId":"0","ingredientName":"extra virgin olive oil","ingredientGroup":"Vinaigrette ","ingredientType":"P","measurement":"0.25","measurementUpper":null,"unit":"cup","preparation":null,"productId":"248084","productQuantity":"1","note":null,"manualTips":null,"smartTips":null,"sponsor":null}],"swapDisclaimer":"\u003Cp\u003EItem’s allergen/dietary info may not match the recipe\u003C/p\u003E\r\n","generalDisclaimerTitle":"Check product allergen & dietary info","generalDisclaimer":"\u003Cp\u003EPlease note products displayed here may not match the allergy or diet tags on the recipe.\u003C/p\u003E\r\n",":type":"woolworths-foodhub/components/content/ingredients"},"nutritional_facts":{"nutritionalFactTitle":"Nutrition per serving","nutritionalFactDisclaimer":"\u003Cp\u003EQuantities above are a guide only. *Percentage daily energy intake is based on an average adult diet of 8700 kJ. \u003C/p\u003E\r\n","ctaText":"more","primaryFact1Object":{"nutritionalFact":"perServeKilojoules"},"primaryFact2Object":{"nutritionalFact":"perServeCalorie"},"pieFactObject":{"nutritionalFact":"dailyIntakeKilojoules"},"pieFactDescription":"of daily energy intake*","nutritionalFactMapping":[{"nutritionalFact":"perServeKilojoules","nutritionalFactMeasurement":"kJ","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"dailyIntakeKilojoules","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"perHundredKj","nutritionalFactMeasurement":"kJ","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"perServeCalorie","nutritionalFactMeasurement":"Cal","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"dailyIntakeCalorie","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"perHundredCalories","nutritionalFactMeasurement":"Cal","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"perServeProtein","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"dailyIntakeProtein","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"perHundredProtein","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"perServeFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"dailyIntakeFat","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"perHundredFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"perServeFatSaturated","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"dailyIntakeFatSaturated","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"perHundredFatSaturated","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"perServeFatTrans","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"dailyIntakeFatTrans","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"perHundredTransFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"perServeCarbohydrates","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"dailyIntakeCarbohydrates","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"perHundredCarbohydrates","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"perServeSugar","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"dailyIntakeSugar","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"perHundredSugar","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"perServeFibre","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"dailyIntakeFibre","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"perHundredFibre","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"perServeSodium","nutritionalFactMeasurement":"mg","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"dailyIntakeSodium","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"perHundredSodium","nutritionalFactMeasurement":"mg","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"perServeSalt","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Salt"},{"nutritionalFact":"dailyIntakeSalt","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Salt"},{"nutritionalFact":"perHundredSalt","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Salt"}],"secondaryNutritionalFact":[{"nutritionalFact":"perServeProtein"},{"nutritionalFact":"perServeFat"},{"nutritionalFact":"perServeCarbohydrates"},{"nutritionalFact":"perServeSugar"}],"modalTitle":"Nutrition Information","modalDisclaimer":"\u003Cp\u003EAll quantities stated above are averages. This information is provided as a guide only and may not reflect the 'Shop the recipe' products' nutrition information. Any ingredients or products mentioned in recipe 'tips' are optional and have not been included in the recipe's nutrition information. Please check each product's label or enquire with the manufacturer to confirm if products used to prepare this recipe are suitable for your individual needs.\u003C/p\u003E\r\n\u003Cp\u003E*Percentage daily intakes are based on an average adult diet of 8700 kJ. \u003C/p\u003E\r\n\u003Cp\u003E'-' means that the nutrition information is not available.\u003C/p\u003E\r\n","modalColumns":[{},{"columnTitle":"Qty Per Serving"},{"columnTitle":"% DI* Per Serving"},{"columnTitle":"Qty Per 100g"}],"modalRows":[{"modalRow":[{"rowTitle":"Energy","rowNutrition":[{"nutritionalFact":"perServeKilojoules"},{"nutritionalFact":"dailyIntakeKilojoules"},{"nutritionalFact":"perHundredKj"}]},{"rowNutrition":[{"nutritionalFact":"perServeCalorie"},{},{"nutritionalFact":"perHundredCalories"}]}]},{"modalRow":[{"rowTitle":"Protein","rowNutrition":[{"nutritionalFact":"perServeProtein"},{"nutritionalFact":"dailyIntakeProtein"},{"nutritionalFact":"perHundredProtein"}]}]},{"modalRow":[{"rowTitle":"Fat, Total","rowNutrition":[{"nutritionalFact":"perServeFat"},{"nutritionalFact":"dailyIntakeFat"},{"nutritionalFact":"perHundredFat"}]},{"rowTitle":"Saturated","rowNutrition":[{"nutritionalFact":"perServeFatSaturated"},{"nutritionalFact":"dailyIntakeFatSaturated"},{"nutritionalFact":"perHundredFatSaturated"}]}]},{"modalRow":[{"rowTitle":"Carbohydrate","rowNutrition":[{"nutritionalFact":"perServeCarbohydrates"},{"nutritionalFact":"dailyIntakeCarbohydrates"},{"nutritionalFact":"perHundredCarbohydrates"}]},{"rowTitle":"Sugars","rowNutrition":[{"nutritionalFact":"perServeSugar"},{"nutritionalFact":"dailyIntakeSugar"},{"nutritionalFact":"perHundredSugar"}]}]},{"modalRow":[{"rowTitle":"Dietary Fibre","rowNutrition":[{"nutritionalFact":"perServeFibre"},{"nutritionalFact":"dailyIntakeFibre"},{"nutritionalFact":"perHundredFibre"}]}]},{"modalRow":[{"rowTitle":"Sodium","rowNutrition":[{"nutritionalFact":"perServeSodium"},{"nutritionalFact":"dailyIntakeSodium"},{"nutritionalFact":"perHundredSodium"}]}]}],"serveDefault":"4","allowAjust":"true",":type":"woolworths-foodhub/components/content/nutritional-facts"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnCount":12,"columnClassNames":{"methods":"aem-GridColumn aem-GridColumn--default--12","description":"aem-GridColumn aem-GridColumn--default--12","categories_panel":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["description","methods","categories_panel"],":items":{"description":{"header":"Description","isRecipeDescription":true,":type":"woolworths-foodhub/components/content/description"},"methods":{"methodPanelTitle":"Method","methodStepPrefix":"Step","methodList":[{"method":"Bring a medium saucepan of water to the boil over high heat. Cook asparagus and snow peas for 2 minutes or until just tender. Drain. Refresh under cold water. Drain.","methodId":"23289","manualTips":null,"smartTips":null,"imageUrl":null},{"method":"Meanwhile, to make the vinaigrette, whisk all the ingredients together in a small jug until combined, then season.","methodId":"23290","manualTips":null,"smartTips":null,"imageUrl":null},{"method":"Arrange lettuce, asparagus, snow peas and radish on a platter. Scatter over feta, drizzle with dressing, top with basil and almonds, then serve.","methodId":"23291","manualTips":null,"smartTips":null,"imageUrl":null}],":type":"woolworths-foodhub/components/content/methods"},"categories_panel":{"categoriesPanelTitle":"Categories","categoriesPanelDisclaimer":"\u003Cp\u003EThese categories are provided as a guide only and do not reflect any ingredients or products displayed or referred to on this recipe page and that are not listed in the recipe’s ingredients list. \u003Ca href=\"https://www.woolworths.com.au/shop/discover/healthy-eating/allergies-and-intolerances/filters\" target=\"_self\"\u003EFind out more about allergy, dietary and lifestyle category tags\u003C/a\u003E.\u003Cbr\u003E\r\n\u003C/p\u003E\r\n","tagItems":[{"title":"Salads","url":"/shop/recipes/collections/meal-type/salads","tagId":"foodhub:meal-type/salads"},{"title":"Salad","url":"/shop/recipes/collections/category/salad","tagId":"foodhub:classification/salad"},{"title":"Green salad","url":"/shop/recipes/collections/category/salad/green-salad","tagId":"foodhub:classification/salad/green-salad"},{"title":"Spring","url":"/shop/recipes/collections/seasons/spring","tagId":"foodhub:seasons/spring"},{"title":"Lemon","url":"/shop/recipes/collections/fresh-ingredients/lemon","tagId":"foodhub:fresh-ingredients/lemon"},{"title":"Asparagus","url":"/shop/recipes/collections/fresh-ingredients/asparagus","tagId":"foodhub:fresh-ingredients/asparagus"},{"title":"French","url":"/shop/recipes/collections/cuisine/european/french","tagId":"foodhub:cuisine/european/french"},{"title":"Fresh Ideas","url":"/shop/recipes/collections/partner/fresh-ideas"}],":type":"woolworths-foodhub/components/content/categories-panel"}},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"columnControlOptions":{":type":"nt:unstructured"}},":type":"woolworths-foodhub/components/content/container"},"container_973633552":{"disableBottomMargin":false,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"cqItemsOrder":["c1","c2","c3","c4","columnControlOptions"],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_973633552","cqItems":{"c1":{"columnCount":12,"columnClassNames":{"smart_link":"aem-GridColumn aem-GridColumn--default--12","separator":"aem-GridColumn aem-GridColumn--default--12","disclaimer":"aem-GridColumn aem-GridColumn--default--12","recipe_collection":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":["separator","recipe_collection","smart_link","disclaimer"],":items":{"separator":{":type":"woolworths-foodhub/components/content/separator"},"recipe_collection":{"layout":"horizontal","shelfTitle":"You might also like","showShelfTitle":true,"titleAlignment":"left","showRecipeCount":false,"showMoreCTA":false,"showMoreCTAText":"Show more","showSourceOnCard":true,"showAuthorOnCard":true,"preparationTimeLabel":"Prep","cookTimeLabel":"Cook","difficultyLabel":"Difficulty","showChildTags":false,"recipeCount":0,"viewAllCTA":false,"viewAllCTAText":"View all","toggle":true,"recipeHrCount":15,"tileLayout":"square","tileType":"collectionDynamicDatasource","showShelfHrTitle":true,"queryOrder":"createdDateDescending","collectionDynamicDatasourceUrl":"https://recipe-recommendation.wxdsml.com/v2/recipe-item-item/web/id/#","authorMode":false,"childTags":[],":type":"woolworths-foodhub/components/content/recipe-collection"},"smart_link":{"smartLinkTitle":"Similar Searches","smartLinks":[{"name":"layered salad","url":"/shop/find-recipes/layered-salad"},{"name":"leftover chicken salad recipe","url":"/shop/find-recipes/leftover-chicken-salad-recipe"},{"name":"tabouli salad","url":"/shop/find-recipes/tabouli-salad"},{"name":"beef salad","url":"/shop/find-recipes/beef-salad"},{"name":"filling salad","url":"/shop/find-recipes/filling-salad"}],":type":"woolworths-foodhub/components/content/smart-link"},"disclaimer":{"source":{"disclaimerTitle":"Disclaimer","disclaimerText":""},":type":"woolworths-foodhub/components/content/disclaimer"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnCount":12,"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12",":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"columnControlOptions":{":type":"nt:unstructured"}},":type":"woolworths-foodhub/components/content/container"},"recipe_seo_data":{"type":"Recipe","name":"Asparagus Salad With Lemon Vinaigrette Recipe | Woolworths","url":"/shop/recipes/asparagus-salad-with-lemon-vinaigrette","image":["https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Square-1300x1300"],"author":{"name":"Fresh Ideas","@type":"Person"},"recipeId":"10756","datePublished":"2021-11-16","description":"Try our easy to follow Asparagus Salad With Lemon Vinaigrette recipe. Absolutely delicious with the best ingredients from Woolworths.","prepTime":"PT10M","cookTime":"PT5M","totalTime":"PT15M","keywords":"Salad,Green salad,Spring,Lemon,Asparagus","recipeYield":"4","recipeCategory":"Salads","recipeCuisine":"French","recipeIngredient":["2 bunches asparagus, trimmed, halved diagonally","100g snow peas, trimmed, halved diagonally","2 gem lettuce, trimmed, leaves separated","2 radishes, trimmed, thinly sliced into rounds","80g feta, crumbled","0.5 cup small basil leaves","2 tbs natural sliced almonds, toasted","1 tbs white wine vinegar","2 tsp Dijon mustard","0.25 tsp sea salt flakes","0.25 tsp caster sugar","0.25 cup extra virgin olive oil"],"resourceType":"woolworths-foodhub/components/structure/recipePage","analyticsEvent":"aemRecipeDetail","analyticsType":"recipedetail","analyticsHierarchy":"shop:recipedetail","analyticsName":"shop:recipedetail","analyticsSection":"shop:recipedetail","recipeInstructions":[{"text":"Bring a medium saucepan of water to the boil over high heat. Cook asparagus and snow peas for 2 minutes or until just tender. Drain. Refresh under cold water. Drain.","@type":"HowToStep","HowToTip":{}},{"text":"Meanwhile, to make the vinaigrette, whisk all the ingredients together in a small jug until combined, then season.","@type":"HowToStep","HowToTip":{}},{"text":"Arrange lettuce, asparagus, snow peas and radish on a platter. Scatter over feta, drizzle with dressing, top with basil and almonds, then serve.","@type":"HowToStep","HowToTip":{}}],"@context":"https://schema.org/",":type":"woolworths-foodhub/components/content/recipe-seo-data"}},":type":"wcm/foundation/components/responsivegrid"},"ingredientList":{":type":"nt:unstructured"},"methodList":{":type":"nt:unstructured"},"imagesList":{":type":"nt:unstructured"}},":hierarchyType":"page",":path":"/content/woolworths-foodhub/en/asparagus-salad-with-lemon-vinaigrette"} + + Woolworths Supermarket - Buy Groceries Online + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+
+ + + +
+ +
+ + + + + +
+
+ + + +
+ +
+
+
+
+
+ Next, choose a time +
+ +
+ + + +
+ + + +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/legacy/test_data/woolworths.testjson b/tests/legacy/test_data/woolworths.testjson new file mode 100644 index 000000000..0f4d017cf --- /dev/null +++ b/tests/legacy/test_data/woolworths.testjson @@ -0,0 +1,2 @@ +{"title":"Smoothie Fruit Cubes","navTitle":"Smoothie Fruit Cubes","seoTitle":"Smoothie Fruit Cubes Recipe | Woolworths","customCreatedDate":1702247470967,"lastModifiedDate":1702430674344,"templateName":"spa-page-template1","cssClassNames":"recipePage page basicpage","designPath":"/libs/settings/wcm/designs/default","brandSlug":"","componentsResourceTypes":["woolworths-foodhub/components/content/ingredients","woolworths-foodhub/components/content/description","woolworths-foodhub/components/content/container","woolworths-foodhub/components/content/nutritional-facts","woolworths-foodhub/components/content/separator","woolworths-foodhub/components/content/smart-link","woolworths-foodhub/components/content/byline","nt:unstructured","woolworths-foodhub/components/structure/recipePage","woolworths-foodhub/components/content/mbox","woolworths-foodhub/components/content/summary-panel","woolworths-foodhub/components/content/disclaimer","woolworths-foodhub/components/content/images","woolworths-foodhub/components/content/methods","woolworths-foodhub/components/content/breadcrumb","wcm/foundation/components/responsivegrid","woolworths-foodhub/components/content/rating-review","woolworths-foodhub/components/content/title","woolworths-foodhub/components/content/recipe-seo-data","woolworths-foodhub/components/content/categories-panel","woolworths-foodhub/components/content/recipe-collection"],"language":"en",":type":"woolworths-foodhub/components/structure/recipePage",":itemsOrder":["root"],":items":{"root":{"columnClassNames":{"container":"aem-GridColumn aem-GridColumn--default--12","container_136487242":"aem-GridColumn aem-GridColumn--default--12","breadcrumb":"aem-GridColumn aem-GridColumn--default--12","recipe_seo_data":"aem-GridColumn aem-GridColumn--default--12","container_49734716":"aem-GridColumn aem-GridColumn--default--12","container_1633042362":"aem-GridColumn aem-GridColumn--default--12","container_973633552":"aem-GridColumn aem-GridColumn--default--12","container_1800110286":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["breadcrumb","container","container_49734716","container_1633042362","container_1800110286","container_136487242","container_973633552","recipe_seo_data"],":items":{"breadcrumb":{"breadcrumbs":[{"name":"Home","url":"/"},{"name":"Recipes","url":"/shop/recipes"},{"name":"Drink","url":"/shop/recipes/collections/category/drink"},{"name":"Non-alcoholic drink","url":"/shop/recipes/collections/category/drink/non-alcoholic-drink"},{"name":"Smoothie & frappé","url":"/shop/recipes/collections/category/drink/non-alcoholic-drink/smoothie-and-frappe"},{"name":"Smoothie Fruit Cubes","url":""}],"itemListElement":[{"position":1,"name":"Home","item":"/","@type":"ListItem"},{"position":2,"name":"Recipes","item":"/shop/recipes","@type":"ListItem"},{"position":3,"name":"Drink","item":"/shop/recipes/collections/category/drink","@type":"ListItem"},{"position":4,"name":"Non-alcoholic drink","item":"/shop/recipes/collections/category/drink/non-alcoholic-drink","@type":"ListItem"},{"position":5,"name":"Smoothie & frappé","item":"/shop/recipes/collections/category/drink/non-alcoholic-drink/smoothie-and-frappe","@type":"ListItem"},{"position":6,"name":"Smoothie Fruit Cubes","@type":"ListItem"}],":type":"woolworths-foodhub/components/content/breadcrumb"},"container":{"backgroundColor":"#FFFFFF","disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"container":"aem-GridColumn aem-GridColumn--default--12","images":"aem-GridColumn aem-GridColumn--default--12","mbox_620237060":"aem-GridColumn aem-GridColumn--default--12","title":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["mbox_620237060","title","container","images"],":items":{"mbox_620237060":{"id":"acs.w-s.web.recipe.detail.top.banner",":type":"woolworths-foodhub/components/content/mbox"},"title":{"title":"Smoothie Fruit Cubes","titleAlignment":"middle",":type":"woolworths-foodhub/components/content/title"},"container":{"backgroundColor":"#FFFFFF","disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"6","smallMobileColumnOption":"12"},{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"6","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container/c1/container",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"rating_review_1804697453":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["rating_review_1804697453"],":items":{"rating_review_1804697453":{"reviewType":"rating_summary","authorMode":false,"isRatingsAndReviews":true,"recipeId":"FIM-2401-52",":type":"woolworths-foodhub/components/content/rating-review"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{"byline":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["byline"],":items":{"byline":{"sourceOverrideImage":"","source":{"name":"Fresh Ideas","sourceUrl":"/shop/recipes/collections/partner/fresh-ideas","icon":"https://foodhub.scene7.com/is/image/woolworthsltdprod/icons-woolies-fresh-ideas?fmt=png-alpha","sourceId":"FI","imageHeader":"https://foodhub.scene7.com/is/image/woolworthsltdprod/Woolworths-Fresh-Ideas-Primary-Stacked-CMYK_C?fmt=png-alpha","jcrLastModified":1653275612711,"createdDate":1611177957988,"customCreatedDate":1611177957988,"disclaimer":"\u003Cp style=\"text-align: center;\"\u003EReviews and recipe photos are submitted by our users and are not endorsed by Woolworths. Woolworths does not represent or warrant the accuracy of any statements, claims or opinions in user content.\u003C/p\u003E\r\n","isRatingsAndReviews":true,"ctaText":"Fresh Ideas recipes","listingUrl":"https://www.woolworths.com.au/shop/recipes/collections/partner/fresh-ideas","sourcePureUrl":"fresh-ideas"},":type":"woolworths-foodhub/components/content/byline"}},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"images":{"imagesList":[{"imageId":null,"imageUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes?wid=1300&hei=1300&fmt=png-alpha","imageAlt":"Smoothie Fruit Cubes","primary":"yes","presetType":"image","preset":null,"smartCrop":null,"imageMobileCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Mobile-1300x1150","imageDesktopCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Desktop-1300x658","squareCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Square-1300x1300"}],"isVideo":false,"startAt":"0","autoplay":false,"expandPlayer":false,"mute":false,"videoTitle":"Smoothie Fruit Cubes","videoDescription":"Mix up marvellous, flavourful summer smoothies in an instant with easy-to-make frozen fruit cubes.","isEditMode":false,"mobileThumbnailUrl":"","desktopThumbnailUrl":"","squareThumbnailUrl":"",":type":"woolworths-foodhub/components/content/images"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"container_49734716":{"disableBottomMargin":false,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_49734716",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"summary_panel":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["summary_panel"],":items":{"summary_panel":{"print":true,"save":true,"issocial":true,"share":[{"shareMedia":"facebook","shareUrl":"https://www.facebook.com/sharer/sharer.php?u="},{"shareMedia":"pinterest","shareUrl":"https://pinterest.com/pin/create/bookmarklet/?url="}],"recipeTitle":"Smoothie Fruit Cubes","recipeSaveAddedMsg":"\u003Cp\u003ERecipe added to \u003Ca href=\"/content/woolworths-foodhub/homepage/saved-recipes.html\"\u003ESaved Recipes\u003C/a\u003E\u003C/p\u003E\r\n","recipeSaveRemovedMsg":"\u003Cp\u003ERemoved from \u003Ca href=\"/content/woolworths-foodhub/homepage/saved-recipes.html\"\u003ESaved Recipes\u003C/a\u003E\u003C/p\u003E\r\n","recipeSaveErrorMsg":"\u003Cp\u003ESomething went wrong, please try again\u003C/p\u003E\r\n","showMealPlanButton":true,"addedToMealPlanMsg":"\u003Cp\u003ERecipe added to \u003Ca href=\"/content/woolworths-foodhub/meal-plan.html\"\u003Emeal plan\u003C/a\u003E\u003C/p\u003E\r\n","summaryListItems":[{"variation":"prepTime","restTime":null,"cookTime":"","serveDefault":"12","serveUpper":null,"serveSizeUnit":null,"complexity":"1","prepTime":"15m","ingredientsCount":1,"stepsCount":3,"prepTimeTitle":"Prep","cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null,"totalTime":"15m"},{"variation":"cookTime","restTime":null,"cookTime":"","serveDefault":"12","serveUpper":null,"serveSizeUnit":null,"complexity":"1","prepTime":"15m","ingredientsCount":1,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":"Cook","restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null,"totalTime":"15m"},{"variation":"servesSize","restTime":null,"cookTime":"","serveDefault":"12","serveUpper":null,"serveSizeUnit":null,"complexity":"1","prepTime":"15m","ingredientsCount":1,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":"Serves","serveSizeUnitTitle":null,"complexityTitle":null,"ingredientsCountTitle":null,"stepsCountTitle":null,"totalTime":"15m"},{"variation":"complexity","restTime":null,"cookTime":"","serveDefault":"12","serveUpper":null,"serveSizeUnit":null,"complexity":"1","prepTime":"15m","ingredientsCount":1,"stepsCount":3,"prepTimeTitle":null,"cookTimeTitle":null,"restTimeTitle":null,"totalTimeTitle":null,"serveDefaultTitle":null,"serveSizeUnitTitle":null,"complexityTitle":"Difficulty","ingredientsCountTitle":null,"stepsCountTitle":null,"totalTime":"15m"}],"recipeSavesApiKey":"cCFAIyQlcmVeJipmaSgpeDkzZ29kS2FuR2J6R25OWHFMdWRSZkpQb1Q2Z25jSE9SOHZ2cUMxOWFUaWp1aVlNd09hRkdWNXc9PXMpKComXnVmJSQjZmkkI0B4MA==","imagesList":{"imageId":null,"imageUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes?wid=1300&hei=1300&fmt=png-alpha","imageAlt":"Smoothie Fruit Cubes","primary":"yes","presetType":"image","preset":null,"smartCrop":null,"imageMobileCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Mobile-1300x1150","imageDesktopCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Desktop-1300x658","squareCropUrl":"https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Square-1300x1300"},":type":"woolworths-foodhub/components/content/summary-panel"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"container_1633042362":{"disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"12","smallMobileColumnOption":"12"},{"desktopColumnOption":"6","smallDesktopColumnOption":"6","tabletColumnOption":"6","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_1633042362",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"nutritional_facts":"aem-GridColumn aem-GridColumn--default--12","ingredients":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["ingredients","nutritional_facts"],":items":{"ingredients":{"recipeTitle":"Smoothie Fruit Cubes","whiskToken":"OvupLC3bOkkbbEzqatZA526kWNijke90UZ3opCHvOf9gTkgqBxmIxb61ecEPBIVh","ingredientTitle":"Ingredients","ingredientServings":"Number of servings","copyButtonText":"Copy text","copyButtonIcon":"iconAct-New_Window","addToListText":"Add to list","addToListIcon":"iconAct-Save_To_List","shopRecipeText":"Shop ingredients","shopRecipeIcon":"iconShop-Cart-Outlined","ingredientList":[{"ingredientId":"FIM-2401-52-01","ingredientName":"fruit of choice","ingredientGroup":null,"ingredientType":"M","measurement":"300","measurementUpper":null,"unit":"g","preparation":null,"productId":"114995","productQuantity":"1","note":"see tip","manualTips":null,"smartTips":[],"sponsor":null}],"swapDisclaimer":"\u003Cp\u003EItem’s allergen/dietary info may not match the recipe\u003C/p\u003E\r\n","generalDisclaimerTitle":"Check product allergen & dietary info","generalDisclaimer":"\u003Cp\u003EPlease note products displayed here may not match the allergy or diet tags on the recipe.\u003C/p\u003E\r\n",":type":"woolworths-foodhub/components/content/ingredients"},"nutritional_facts":{"nutritionalFactTitle":"Nutrition per serving","nutritionalFactDisclaimer":"\u003Cp\u003EQuantities above are a guide only. *Percentage daily energy intake is based on an average adult diet of 8700 kJ. \u003C/p\u003E\r\n","ctaText":"more","primaryFact1Object":{"nutritionalFact":"perServeKilojoules","nutritionalFactValue":"27"},"primaryFact2Object":{"nutritionalFact":"perServeCalorie","nutritionalFactValue":"6"},"pieFactObject":{"nutritionalFact":"dailyIntakeKilojoules","nutritionalFactValue":"0"},"pieFactDescription":"of daily energy intake*","nutritionalFactMapping":[{"nutritionalFact":"perServeKilojoules","nutritionalFactMeasurement":"kJ","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"dailyIntakeKilojoules","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"perHundredKj","nutritionalFactMeasurement":"kJ","nutritionalFactDisplayName":"Kilojoules"},{"nutritionalFact":"perServeCalorie","nutritionalFactMeasurement":"Cal","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"dailyIntakeCalorie","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"perHundredCalories","nutritionalFactMeasurement":"Cal","nutritionalFactDisplayName":"Calories"},{"nutritionalFact":"perServeProtein","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"dailyIntakeProtein","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"perHundredProtein","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Protein"},{"nutritionalFact":"perServeFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"dailyIntakeFat","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"perHundredFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fat"},{"nutritionalFact":"perServeFatSaturated","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"dailyIntakeFatSaturated","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"perHundredFatSaturated","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Saturated Fat"},{"nutritionalFact":"perServeFatTrans","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"dailyIntakeFatTrans","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"perHundredTransFat","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Trans Fat"},{"nutritionalFact":"perServeCarbohydrates","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"dailyIntakeCarbohydrates","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"perHundredCarbohydrates","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Carbs"},{"nutritionalFact":"perServeSugar","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"dailyIntakeSugar","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"perHundredSugar","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Sugars"},{"nutritionalFact":"perServeFibre","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"dailyIntakeFibre","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"perHundredFibre","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Fibre"},{"nutritionalFact":"perServeSodium","nutritionalFactMeasurement":"mg","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"dailyIntakeSodium","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"perHundredSodium","nutritionalFactMeasurement":"mg","nutritionalFactDisplayName":"Sodium"},{"nutritionalFact":"perServeSalt","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Salt"},{"nutritionalFact":"dailyIntakeSalt","nutritionalFactMeasurement":"%","nutritionalFactDisplayName":"Salt"},{"nutritionalFact":"perHundredSalt","nutritionalFactMeasurement":"g","nutritionalFactDisplayName":"Salt"}],"secondaryNutritionalFact":[{"nutritionalFact":"perServeProtein","nutritionalFactValue":"0.2"},{"nutritionalFact":"perServeFat","nutritionalFactValue":"0.1"},{"nutritionalFact":"perServeCarbohydrates","nutritionalFactValue":"1.1"},{"nutritionalFact":"perServeSugar","nutritionalFactValue":"1.1"}],"perServeSalt":"0.0","dailyIntakeSalt":"0","perServeCalorie":"6","dailyIntakeCalorie":"0","perServeSodium":"10","dailyIntakeSodium":"0","perHundredSodium":"40","perServeKilojoules":"27","dailyIntakeKilojoules":"0","perServeSugar":"1.1","dailyIntakeSugar":"1","perHundredSugar":"4.4","perServeCarbohydrates":"1.1","dailyIntakeCarbohydrates":"0","perServeFat":"0.1","dailyIntakeFat":"0","perHundredFat":"0.3","perServeFibre":"0.2","dailyIntakeFibre":"1","perServeProtein":"0.2","dailyIntakeProtein":"0","perHundredKj":"107","perHundredCalories":"26","perHundredProtein":"0.8","perHundredCarbohydrates":"4.4","perHundredFibre":"0.9","perHundredSalt":"0.1","modalTitle":"Nutrition Information","modalDisclaimer":"\u003Cp\u003EAll quantities stated above are averages. This information is provided as a guide only and may not reflect the 'Shop the recipe' products' nutrition information. Any ingredients or products mentioned in recipe 'tips' are optional and have not been included in the recipe's nutrition information. Please check each product's label or enquire with the manufacturer to confirm if products used to prepare this recipe are suitable for your individual needs.\u003C/p\u003E\r\n\u003Cp\u003E*Percentage daily intakes are based on an average adult diet of 8700 kJ. \u003C/p\u003E\r\n\u003Cp\u003E'-' means that the nutrition information is not available.\u003C/p\u003E\r\n","modalColumns":[{},{"columnTitle":"Qty Per Serving"},{"columnTitle":"% DI* Per Serving"},{"columnTitle":"Qty Per 100g/100mL"}],"modalRows":[{"modalRow":[{"rowTitle":"Energy","rowNutrition":[{"nutritionalFact":"perServeKilojoules","nutritionalFactValue":"27"},{"nutritionalFact":"dailyIntakeKilojoules","nutritionalFactValue":"0"},{"nutritionalFact":"perHundredKj","nutritionalFactValue":"107"}]},{"rowNutrition":[{"nutritionalFact":"perServeCalorie","nutritionalFactValue":"6"},{},{"nutritionalFact":"perHundredCalories","nutritionalFactValue":"26"}]}]},{"modalRow":[{"rowTitle":"Protein","rowNutrition":[{"nutritionalFact":"perServeProtein","nutritionalFactValue":"0.2"},{"nutritionalFact":"dailyIntakeProtein","nutritionalFactValue":"0"},{"nutritionalFact":"perHundredProtein","nutritionalFactValue":"0.8"}]}]},{"modalRow":[{"rowTitle":"Fat, Total","rowNutrition":[{"nutritionalFact":"perServeFat","nutritionalFactValue":"0.1"},{"nutritionalFact":"dailyIntakeFat","nutritionalFactValue":"0"},{"nutritionalFact":"perHundredFat","nutritionalFactValue":"0.3"}]},{"rowTitle":"Saturated","rowNutrition":[{"nutritionalFact":"perServeFatSaturated"},{"nutritionalFact":"dailyIntakeFatSaturated"},{"nutritionalFact":"perHundredFatSaturated"}]}]},{"modalRow":[{"rowTitle":"Carbohydrate","rowNutrition":[{"nutritionalFact":"perServeCarbohydrates","nutritionalFactValue":"1.1"},{"nutritionalFact":"dailyIntakeCarbohydrates","nutritionalFactValue":"0"},{"nutritionalFact":"perHundredCarbohydrates","nutritionalFactValue":"4.4"}]},{"rowTitle":"Sugars","rowNutrition":[{"nutritionalFact":"perServeSugar","nutritionalFactValue":"1.1"},{"nutritionalFact":"dailyIntakeSugar","nutritionalFactValue":"1"},{"nutritionalFact":"perHundredSugar","nutritionalFactValue":"4.4"}]}]},{"modalRow":[{"rowTitle":"Dietary Fibre","rowNutrition":[{"nutritionalFact":"perServeFibre","nutritionalFactValue":"0.2"},{"nutritionalFact":"dailyIntakeFibre","nutritionalFactValue":"1"},{"nutritionalFact":"perHundredFibre","nutritionalFactValue":"0.9"}]}]},{"modalRow":[{"rowTitle":"Sodium","rowNutrition":[{"nutritionalFact":"perServeSodium","nutritionalFactValue":"10"},{"nutritionalFact":"dailyIntakeSodium","nutritionalFactValue":"0"},{"nutritionalFact":"perHundredSodium","nutritionalFactValue":"40"}]}]}],"serveDefault":"12","allowAjust":"true",":type":"woolworths-foodhub/components/content/nutritional-facts"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{"methods":"aem-GridColumn aem-GridColumn--default--12","description":"aem-GridColumn aem-GridColumn--default--12","categories_panel":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["description","methods","categories_panel"],":items":{"description":{"header":"Description","description":"Mix up marvellous, flavourful summer smoothies in an instant with easy-to-make frozen fruit cubes.","isRecipeDescription":true,"manualTips":[{"tipId":"Cooking tip","tipText":"These ice cubes work well with any fruit, including blackberries, peaches, kiwifruit, watermelon or raspberries.","tipImage":"","tipVideo":""}],":type":"woolworths-foodhub/components/content/description"},"methods":{"methodPanelTitle":"Method","methodStepPrefix":"Step","methodList":[{"method":"Place fruit in a blender and blitz until smooth. Transfer to a small jug.","methodId":"FIM-2401-52-01","manualTips":null,"smartTips":[],"imageUrl":null},{"method":"Pour mixture equally into a 12-hole (1 tbs-/20ml-capacity) ice-cube tray and freeze for 6 hours or overnight until set.","methodId":"FIM-2401-52-02","manualTips":null,"smartTips":[],"imageUrl":null},{"method":"Transfer cubes to an airtight container and store in the freezer until required. (Once ready to use, place cubes in a blender with yoghurt and milk, then blitz until smooth.)","methodId":"FIM-2401-52-03","manualTips":null,"smartTips":[],"imageUrl":null}],"howTo":{"name":"Method","step":[{"text":"Place fruit in a blender and blitz until smooth. Transfer to a small jug.","@type":"HowToStep","HowToTip":{}},{"text":"Pour mixture equally into a 12-hole (1 tbs-/20ml-capacity) ice-cube tray and freeze for 6 hours or overnight until set.","@type":"HowToStep","HowToTip":{}},{"text":"Transfer cubes to an airtight container and store in the freezer until required. (Once ready to use, place cubes in a blender with yoghurt and milk, then blitz until smooth.)","@type":"HowToStep","HowToTip":{}}]},":type":"woolworths-foodhub/components/content/methods"},"categories_panel":{"categoriesPanelTitle":"Categories","categoriesPanelDisclaimer":"\u003Cp\u003EThese categories are provided as a guide only and do not reflect any ingredients or products displayed or referred to on this recipe page and that are not listed in the recipe’s ingredients list. \u003Ca href=\"https://www.woolworths.com.au/shop/discover/healthier-easier/dietary-and-lifestyle-filters\" target=\"_self\"\u003EFind out more about allergy, dietary and lifestyle category tags\u003C/a\u003E.\u003Cbr\u003E\r\n\u003C/p\u003E\r\n","tagItems":[{"title":"Seafood free","url":"/shop/recipes/collections/allergen/seafood-free","tagId":"foodhub:allergen/seafood-free"},{"title":"Gluten free","url":"/shop/recipes/collections/allergen/gluten-free","tagId":"foodhub:allergen/gluten-free"},{"title":"Tree nut free","url":"/shop/recipes/collections/allergen/tree-nut-free","tagId":"foodhub:allergen/tree-nut-free"},{"title":"Sesame free","url":"/shop/recipes/collections/allergen/sesame-free","tagId":"foodhub:allergen/sesame-free"},{"title":"Summer","url":"/shop/recipes/collections/seasons/summer","tagId":"foodhub:seasons/summer"},{"title":"Australian","url":"/shop/recipes/collections/cuisine/australian","tagId":"foodhub:cuisine/australian"},{"title":"Low kilojoule","url":"/shop/recipes/collections/nutrition/low-kilojoule","tagId":"foodhub:nutrition/low-kilojoule"},{"title":"Dairy free","url":"/shop/recipes/collections/allergen/dairy-free","tagId":"foodhub:allergen/dairy-free"},{"title":"Low ingredient","url":"/shop/recipes/collections/everyday-cooking/low-ingredient","tagId":"foodhub:everyday-cooking/low-ingredient"},{"title":"Pescatarian","url":"/shop/recipes/collections/dietary-lifestyle/pescatarian","tagId":"foodhub:dietary-lifestyle/pescatarian"},{"title":"Amanda","url":"/shop/recipes/collections/experts/amanda","tagId":"foodhub:experts/amanda"},{"title":"Low salt","url":"/shop/recipes/collections/nutrition/low-salt","tagId":"foodhub:nutrition/low-salt"},{"title":"Egg free","url":"/shop/recipes/collections/allergen/egg-free","tagId":"foodhub:allergen/egg-free"},{"title":"Drinks","url":"/shop/recipes/collections/meal-type/drinks","tagId":"foodhub:meal-type/drinks"},{"title":"Low sugar","url":"/shop/recipes/collections/nutrition/low-sugar","tagId":"foodhub:nutrition/low-sugar"},{"title":"Halal","url":"/shop/recipes/collections/dietary-lifestyle/halal","tagId":"foodhub:dietary-lifestyle/halal"},{"title":"How to","url":"/shop/recipes/collections/everyday-cooking/how-to","tagId":"foodhub:everyday-cooking/how-to"},{"title":"Vegetarian","url":"/shop/recipes/collections/dietary-lifestyle/vegetarian","tagId":"foodhub:dietary-lifestyle/vegetarian"},{"title":"Soy free","url":"/shop/recipes/collections/allergen/soy-free","tagId":"foodhub:allergen/soy-free"},{"title":"Wheat free","url":"/shop/recipes/collections/allergen/wheat-free","tagId":"foodhub:allergen/wheat-free"},{"title":"Vegan","url":"/shop/recipes/collections/dietary-lifestyle/vegan","tagId":"foodhub:dietary-lifestyle/vegan"},{"title":"Low fat","url":"/shop/recipes/collections/nutrition/low-fat","tagId":"foodhub:nutrition/low-fat"},{"title":"Smoothie & frappé","url":"/shop/recipes/collections/category/drink/non-alcoholic-drink/smoothie-and-frappe","tagId":"foodhub:classification/drink/non-alcoholic-drink/smoothie-and-frappe"},{"title":"Peanut free","url":"/shop/recipes/collections/allergen/peanut-free","tagId":"foodhub:allergen/peanut-free"},{"title":"Jan Feb 2024","url":"/shop/recipes/collections/fresh-ideas-magazine/jan-feb-2024","tagId":"foodhub:fresh-ideas-magazine/jan-feb-2024"},{"title":"Fresh Ideas","url":"/shop/recipes/collections/partner/fresh-ideas"}],":type":"woolworths-foodhub/components/content/categories-panel"}},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"container_1800110286":{"disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_1800110286",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"recipe_collection_co":"aem-GridColumn aem-GridColumn--default--12","separator":"aem-GridColumn aem-GridColumn--default--12","mbox":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["separator","recipe_collection_co","mbox"],":items":{"separator":{":type":"woolworths-foodhub/components/content/separator"},"recipe_collection_co":{"pageCount":0,"layout":"horizontal","shelfTitle":"You might also like","showShelfTitle":true,"showInListingCollections":false,"titleAlignment":"left","allFiltersClearAllText":"Clear all","allFiltersLinkText":"All {category}","allFiltersCTAButtonText":"Show recipes","allFiltersCTAButtonTheme":"reversed-primary","categoryFiltersText":"Want to explore more recipes?","categoryFiltersLinkText":"All recipe categories","categoryFiltersLinkURL":"/shop/ideas/categories","categoryFiltersCTAButtonText":"Show recipes","categoryFiltersCTAButtonTheme":"reversed-primary","quickFiltersLinkText":"View all {category}","quickFiltersClearAllText":"Clear all","quickFiltersCTAButtonText":"Show recipes","quickFiltersCTAButtonTheme":"reversed-primary","clearAllText":"Clear all","categoryFiltersClearAllText":"Clear all","showRecipeCount":false,"showMoreCTA":false,"showMoreCTAText":"Show more","showSourceOnCard":true,"showAuthorOnCard":true,"preparationTimeLabel":"Prep","cookTimeLabel":"Cook","difficultyLabel":"Difficulty","showChildTags":false,"recipeCount":0,"viewAllCTA":false,"viewAllCTAText":"View all","toggle":true,"recipeHrCount":15,"tileLayout":"square","tileType":"collectionDynamicDatasource","showShelfHrTitle":true,"queryOrder":"createdDateDescending","collectionDynamicDatasourceUrl":"https://recipe-recommendation.wxdsml.com/v2/recipe-item-item/web/id/#","showAllFiltersChip":false,"showCategoryFiltersChip":false,"showQuickFiltersChip":false,"hideNavTitle":false,"showSourceImage":true,"showVideoPlayIcon":false,"showMealPlannerIcon":false,"showSavedIcon":true,"mySavedChip":false,"showDescription":false,"authorMode":false,"noSavedRecipesCtaText":"","noSavedRecipesMessage":"","noSavedRecipesCtaTheme":"","noSavedRecipesTitle":"","recipeSavesLoggedOutCtaText":"","recipeSavesLoggedOutMessage":"","recipeSavesLoggedOutCtaTheme":"","recipeSavesLoggedOutTitle":"","fixedForTargeting":false,"targetingId":"recipeCollection-yml-2031522913","allFiltersTags":[],"childTags":[],"categoryFiltersTags":[],"quickFiltersTags":[],"editMode":false,":type":"woolworths-foodhub/components/content/recipe-collection"},"mbox":{"id":"acs.w-s.web.recipe.section.title",":type":"woolworths-foodhub/components/content/mbox"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"container_136487242":{"disableBottomMargin":true,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"3","smallDesktopColumnOption":"3","tabletColumnOption":"3","mobileColumnOption":"3","smallMobileColumnOption":"12"},{"desktopColumnOption":"3","smallDesktopColumnOption":"3","tabletColumnOption":"3","mobileColumnOption":"3","smallMobileColumnOption":"12"},{"desktopColumnOption":"3","smallDesktopColumnOption":"3","tabletColumnOption":"3","mobileColumnOption":"3","smallMobileColumnOption":"12"},{"desktopColumnOption":"3","smallDesktopColumnOption":"3","tabletColumnOption":"3","mobileColumnOption":"3","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_136487242",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"mbox":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["mbox"],":items":{"mbox":{"id":"acs.w-s.web.recipe.detail.card.1",":type":"woolworths-foodhub/components/content/mbox"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{"mbox":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["mbox"],":items":{"mbox":{"id":"acs.w-s.web.recipe.detail.card.2",":type":"woolworths-foodhub/components/content/mbox"}},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{"mbox":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["mbox"],":items":{"mbox":{"id":"acs.w-s.web.recipe.detail.card.3",":type":"woolworths-foodhub/components/content/mbox"}},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{"mbox":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["mbox"],":items":{"mbox":{"id":"acs.w-s.web.recipe.detail.card.4",":type":"woolworths-foodhub/components/content/mbox"}},":type":"wcm/foundation/components/responsivegrid"}}},"container_973633552":{"disableBottomMargin":false,"alignLandingAndListingPages":false,"columnControlOptions":[{"desktopColumnOption":"12","smallDesktopColumnOption":"12","tabletColumnOption":"12","mobileColumnOption":"12","smallMobileColumnOption":"12"}],"resourcePath":"/conf/woolworths-foodhub/settings/wcm/templates/spa-page-template1/structure/jcr:content/root/container_973633552",":type":"woolworths-foodhub/components/content/container","cqItemsOrder":["c1","c2","c3","c4"],"cqItems":{"c1":{"columnClassNames":{"rating_review":"aem-GridColumn aem-GridColumn--default--12","smart_link":"aem-GridColumn aem-GridColumn--default--12","description":"aem-GridColumn aem-GridColumn--default--12","separator_511630525":"aem-GridColumn aem-GridColumn--default--12","disclaimer":"aem-GridColumn aem-GridColumn--default--12"},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":["smart_link","separator_511630525","description","rating_review","disclaimer"],":items":{"smart_link":{"smartLinkTitle":"Similar Searches","smartLinks":[{"name":"fruit flan","url":"/shop/find-recipes/fruit-flan"},{"name":"fruit skewers","url":"/shop/find-recipes/fruit-skewers"},{"name":"frozen mango smoothie recipe","url":"/shop/find-recipes/frozen-mango-smoothie-recipe"},{"name":"fruit cream recipe","url":"/shop/find-recipes/fruit-cream-recipe"},{"name":"fruit recipes","url":"/shop/find-recipes/fruit-recipes"}],":type":"woolworths-foodhub/components/content/smart-link"},"separator_511630525":{":type":"woolworths-foodhub/components/content/separator"},"description":{"description":"\u003Cp style=\"text-align: right;\"\u003EYour identity is kept private from the public \u003Ci class=\"iconAct-Security_Filled\"\u003E\u003C/i\u003E\u003C/p\u003E\r\n","isRecipeDescription":false,":type":"woolworths-foodhub/components/content/description"},"rating_review":{"reviewType":"reviews","authorMode":false,"isRatingsAndReviews":true,"recipeId":"FIM-2401-52",":type":"woolworths-foodhub/components/content/rating-review"},"disclaimer":{"tag":{"disclaimerTitle":null,"disclaimerText":""},"recipe":{"disclaimerTitle":null,"disclaimerText":""},"source":{"disclaimerTitle":"Disclaimer","disclaimerText":"\u003Cp style=\"text-align: center;\"\u003EReviews and recipe photos are submitted by our users and are not endorsed by Woolworths. Woolworths does not represent or warrant the accuracy of any statements, claims or opinions in user content.\u003C/p\u003E\r\n"},":type":"woolworths-foodhub/components/content/disclaimer"}},":type":"wcm/foundation/components/responsivegrid"},"c2":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c3":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"},"c4":{"columnClassNames":{},"gridClassNames":"aem-Grid aem-Grid--12 aem-Grid--default--12","columnCount":12,":itemsOrder":[],":items":{},":type":"wcm/foundation/components/responsivegrid"}}},"recipe_seo_data":{"type":"Recipe","name":"Smoothie Fruit Cubes Recipe | Woolworths","url":"/shop/recipes/smoothie-fruit-cubes","image":["https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Square-1300x1300"],"author":{"name":"Fresh Ideas","@type":"Person"},"recipeId":"FIM-2401-52","datePublished":"2023-12-13","description":"Mix up marvellous, flavourful summer smoothies in an instant with easy-to-make frozen fruit cubes.","seoDescription":"Try our easy to follow Smoothie Fruit Cubes recipe. Absolutely delicious with the best ingredients from Woolworths.","navDescription":"","prepTime":"PT15M","cookTime":"PT0M","totalTime":"PT15M","keywords":"Smoothie & frappé,Seafood free,Gluten free,Tree nut free,Sesame free,Summer,Low kilojoule,Dairy free,Low ingredient,Pescatarian,Amanda,Low salt,Egg free,Low sugar,Halal,How to,Vegetarian,Soy free,Wheat free,Vegan,Low fat,Peanut free,Jan Feb 2024","recipeYield":"12","recipeCategory":"Drinks","recipeCuisine":"Australian","nutrition":{"calories":"6 calories","sodiumContent":"10 milligrams","sugarContent":"1.1 grams","carbohydrateContent":"1.1 grams","fatContent":"0.1 grams","fiberContent":"0.2 grams","proteinContent":"0.2 grams","@type":"NutritionInformation"},"recipeIngredient":["300g fruit of choice (see tip)"],"resourceType":"woolworths-foodhub/components/structure/recipePage","analyticsEvent":"aemRecipeDetail","analyticsType":"recipedetail","analyticsHierarchy":"shop:recipedetail","analyticsName":"shop:recipedetail","analyticsSection":"shop:recipedetail","recipeInstructions":[{"text":"Place fruit in a blender and blitz until smooth. Transfer to a small jug.","@type":"HowToStep","HowToTip":{}},{"text":"Pour mixture equally into a 12-hole (1 tbs-/20ml-capacity) ice-cube tray and freeze for 6 hours or overnight until set.","@type":"HowToStep","HowToTip":{}},{"text":"Transfer cubes to an airtight container and store in the freezer until required. (Once ready to use, place cubes in a blender with yoghurt and milk, then blitz until smooth.)","@type":"HowToStep","HowToTip":{}}],"licenceData":{},"@context":"https://schema.org/",":type":"woolworths-foodhub/components/content/recipe-seo-data"}},":type":"wcm/foundation/components/responsivegrid"}},":hierarchyType":"page",":path":"/content/woolworths-foodhub/en/smoothie-fruit-cubes"} + \ No newline at end of file diff --git a/tests/legacy/test_woolworths.py b/tests/legacy/test_woolworths.py index 283a9d269..6f71e677a 100644 --- a/tests/legacy/test_woolworths.py +++ b/tests/legacy/test_woolworths.py @@ -9,15 +9,15 @@ class TestWoolworthsScraper(ScraperTest): @classmethod def expected_requests(cls): - yield GET, "https://www.woolworths.com.au/shop/recipes/asparagus-salad-with-lemon-vinaigrette", "tests/legacy/test_data/woolworths.testhtml" - yield GET, "https://foodhub.woolworths.com.au/content/woolworths-foodhub/en/asparagus-salad-with-lemon-vinaigrette.model.json", "tests/legacy/test_data/woolworths.testhtml" + yield GET, "https://www.woolworths.com.au/shop/recipes/smoothie-fruit-cubes", "tests/legacy/test_data/woolworths.testhtml" + yield GET, "https://foodhub.woolworths.com.au/content/woolworths-foodhub/en/smoothie-fruit-cubes.model.json", "tests/legacy/test_data/woolworths.testjson" def test_host(self): self.assertEqual("woolworths.com.au", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( - "https://www.woolworths.com.au/shop/recipes/asparagus-salad-with-lemon-vinaigrette", + "https://www.woolworths.com.au/shop/recipes/smoothie-fruit-cubes", self.harvester_class.canonical_url(), ) @@ -25,11 +25,11 @@ def test_author(self): self.assertEqual("Fresh Ideas", self.harvester_class.author()) def test_category(self): - self.assertEqual("Salads", self.harvester_class.category()) + self.assertEqual("Drinks", self.harvester_class.category()) def test_title(self): self.assertEqual( - "Asparagus Salad With Lemon Vinaigrette Recipe | Woolworths", + "Smoothie Fruit Cubes Recipe | Woolworths", self.harvester_class.title(), ) @@ -37,52 +37,54 @@ def test_total_time(self): self.assertEqual(15, self.harvester_class.total_time()) def test_prep_time(self): - self.assertEqual(10, self.harvester_class.prep_time()) + self.assertEqual(15, self.harvester_class.prep_time()) def test_yields(self): - self.assertEqual("4 servings", self.harvester_class.yields()) + self.assertEqual("12 servings", self.harvester_class.yields()) def test_image(self): self.assertEqual( - "https://foodhub.scene7.com/is/image/woolworthsltdprod/2010-asparagus-salad-with-lemon-vinaigrette:Square-1300x1300", + "https://foodhub.scene7.com/is/image/woolworthsltdprod/fi-2401-smoothie-fruit-cubes:Square-1300x1300", self.harvester_class.image(), ) def test_ingredients(self): self.assertEqual( [ - "2 bunches asparagus, trimmed, halved diagonally", - "100g snow peas, trimmed, halved diagonally", - "2 gem lettuce, trimmed, leaves separated", - "2 radishes, trimmed, thinly sliced into rounds", - "80g feta, crumbled", - "0.5 cup small basil leaves", - "2 tbs natural sliced almonds, toasted", - "1 tbs white wine vinegar", - "2 tsp Dijon mustard", - "0.25 tsp sea salt flakes", - "0.25 tsp caster sugar", - "0.25 cup extra virgin olive oil", + "300g fruit of choice (see tip)", ], self.harvester_class.ingredients(), ) def test_instructions(self): self.assertEqual( - """Bring a medium saucepan of water to the boil over high heat. Cook asparagus and snow peas for 2 minutes or until just tender. Drain. Refresh under cold water. Drain. -Meanwhile, to make the vinaigrette, whisk all the ingredients together in a small jug until combined, then season. -Arrange lettuce, asparagus, snow peas and radish on a platter. Scatter over feta, drizzle with dressing, top with basil and almonds, then serve.""", + ( + "Place fruit in a blender and blitz until smooth. Transfer to a small jug.\n" + "Pour mixture equally into a 12-hole (1 tbs-/20ml-capacity) ice-cube tray and freeze for 6 hours or overnight until set.\n" + "Transfer cubes to an airtight container and store in the freezer until required. (Once ready to use, place cubes in a blender with yoghurt and milk, then blitz until smooth.)" + ), self.harvester_class.instructions(), ) def test_cuisine(self): - self.assertEqual("French", self.harvester_class.cuisine()) + self.assertEqual("Australian", self.harvester_class.cuisine()) def test_cook_time(self): - self.assertEqual(5, self.harvester_class.cook_time()) + self.assertEqual(None, self.harvester_class.cook_time()) def test_nutrients(self): - self.assertEqual({}, self.harvester_class.nutrients()) + self.assertEqual( + { + "calories": "6 calories", + "carbohydrateContent": "1.1 grams", + "fatContent": "0.1 grams", + "fiberContent": "0.2 grams", + "proteinContent": "0.2 grams", + "sodiumContent": "10 milligrams", + "sugarContent": "1.1 grams", + }, + self.harvester_class.nutrients(), + ) def test_language(self): self.assertEqual("en-AU", self.harvester_class.language())