Przeglądaj źródła

Add missing data from HCA scraping config. TG-13

Tati 7 lat temu
rodzic
commit
e406083401

+ 4 - 0
ktchn/src/recipes/scrape/sources/home-cooking-adventure.ts

@@ -9,6 +9,7 @@ const SELECTORS = {
   SERVINGS: 'span.ingheading',
   INGREDIENTS: 'div#ingredients_bg ul li',
   INSTRUCTIONS: 'div#preparation ol li',
+  SUMMARY: 'span[itemprop="summary"]'
 }
 
 function getRecipeName($: CheerioSelector): string {
@@ -64,6 +65,9 @@ const HCA_CONFIG = {
     getRecipeDetails($),
     getIngredients($),
     getInstructions($),
+    [],
+    [],
+    $(SELECTORS.SUMMARY).children().first().text().trim(),  
   )
 }