Documentation ¶
Overview ¶
Package scraper implements the logic to extract a recipe from a website.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("domain is not implemented")
ErrNotImplemented is the error used when the website is not supported.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶ added in v1.1.0
HTTPClient is an interface for making HTTP requests.
type IScraper ¶ added in v1.1.0
type IScraper interface {
Scrape(url string, files services.FilesService) (models.RecipeSchema, error)
}
IScraper is the scraper's interface.
type Scraper ¶ added in v1.1.0
type Scraper struct {
Client HTTPClient
}
Scraper represents the IScraper's implementation.
func NewScraper ¶ added in v1.1.0
func NewScraper(client HTTPClient) *Scraper
NewScraper creates a new Scraper.
func (*Scraper) Scrape ¶ added in v1.1.0
func (s *Scraper) Scrape(url string, files services.FilesService) (models.RecipeSchema, error)
Scrape extracts the recipe from the given URL. An error will be returned when the URL cannot be parsed.
Source Files ¶
- 15gram.go
- afghankitchenrecipes.go
- ah.go
- all-clad.go
- archanaskitchen.go
- argiro.go
- barefootcontessa.go
- bbcgoodfood.go
- bergamot.go
- bettybossi.go
- bettycrocker.go
- bingingwithbabish.go
- blueapron.go
- bodybuilding.go
- bongeats.go
- brianlagerstrom.go
- briceletbaklava.go
- cdkitchen.go
- chefnini.go
- chuckycruz.go
- closetcooking.go
- cooktalk.go
- coop.go
- costco.go
- dk.go
- doc.go
- drinkoteket.go
- eatwell101.go
- espressen.go
- farmhousedelivery.go
- fitmencook.go
- foodbag.go
- foodnetwork.go
- foodrepublic.go
- forksoverknives.go
- francescakookt.go
- gesund-aktiv.go
- giallozafferano.go
- globo.go
- grandfrais.go
- greatbritishchefs.go
- grimgrains.go
- grouprecipes.go
- halfbakedharvest.go
- heatherchristo.go
- helpers.go
- homechef.go
- jaimyskitchen.go
- juliegoodwin.go
- justbento.go
- kennymcgovern.go
- kochbucher.go
- kptncook.go
- kuchniadomova.go
- kuchynalidla.go
- kwestiasmaku.go
- latelierderoxane.go
- lekkerensimpel.go
- lidlkochen.go
- livingthegreenlife.go
- maangchi.go
- meljoulwan.go
- mindmegette.go
- monsieur-cuisine.go
- moulinex.go
- mundodereceitasbimby.go
- myplate.go
- ninjatestkitchen.go
- owen-han.go
- panelinha.go
- paninihappy.go
- ploetzblog.go
- projectgezond.go
- przepisy.go
- purelypope.go
- puurgezond.go
- quitoque.go
- recettes.go
- recipecommunity.go
- reddit.go
- resihunger.go
- rezeptwelt.go
- rosannapansino.go
- saboresajinomoto.go
- sallysblog.go
- scraper.go
- southerncastiron.go
- streetkitchen.go
- sunset.go
- tastykitchen.go
- tesco.go
- thecookingguy.go
- thehappyfoodie.go
- uitpaulineskeuken.go
- usapears.go
- valdemarsro.go
- waitrose.go
- websites.go
- wholefoodsmarket.go
- wikibooks.go
- woop.go
- yemek.go
- yumelise.go
- zeit.go
Click to show internal directories.
Click to hide internal directories.