Explorar el Código

Add missing data from HCA scraping config. TG-13

Tati hace 7 años
padre
commit
e406083401
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      ktchn/src/recipes/scrape/sources/home-cooking-adventure.ts

+ 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(),  
   )
 }