Documentation ¶
Overview ¶
Package scraper retrieves recipes from websites containing it in json+ld format. Compatable website include cooking.nytimes.com, seriouseats.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Recipe ¶
type Recipe struct { Context string `json:"@context"` Type string `json:"@type"` Name string `json:"name"` DatePublished string `json:"datePublished,omitempty"` DateModified string `json:"dateModified,omitempty"` Description string `json:"description"` Image interface{} `json:"image"` AggregateRating struct { Type string `json:"@type"` RatingValue interface{} `json:"ratingValue"` RatingCount interface{} `json:"ratingCount"` } `json:"aggregateRating"` RecipeCategory interface{} `json:"recipeCategory"` RecipeYield string `json:"recipeYield"` RecipeIngredient []string `json:"recipeIngredient"` RecipeInstructions []struct { Type string `json:"@type"` Text string `json:"text"` } `json:"recipeInstructions"` Author struct { Type string `json:"@type"` Name string `json:"name"` JobTitle string `json:"jobTitle"` SameAs []string `json:"sameAs"` Description string `json:"description"` URL string `json:"url"` } `json:"author"` Keywords string `json:"keywords"` TotalTime string `json:"totalTime,omitempty"` RecipeCuisine string `json:"recipeCuisine,omitempty"` Nutrition struct { Context string `json:"@context"` Type string `json:"@type"` Calories int `json:"calories"` UnsaturatedFatContent string `json:"unsaturatedFatContent"` CarbohydrateContent string `json:"carbohydrateContent"` CholesterolContent interface{} `json:"cholesterolContent"` FatContent string `json:"fatContent"` FiberContent string `json:"fiberContent"` ProteinContent string `json:"proteinContent"` SaturatedFatContent string `json:"saturatedFatContent"` SodiumContent string `json:"sodiumContent"` SugarContent string `json:"sugarContent"` TransFatContent string `json:"transFatContent"` } `json:"nutrition,omitempty"` Video struct { Context string `json:"@context"` Type string `json:"@type"` Name string `json:"name"` Description string `json:"description"` ThumbnailURL string `json:"thumbnailUrl"` UploadDate time.Time `json:"uploadDate"` Duration string `json:"duration"` } `json:"video,omitempty"` }
Click to show internal directories.
Click to hide internal directories.