diff options
Diffstat (limited to 'crawler/scrape.go')
| -rw-r--r-- | crawler/scrape.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crawler/scrape.go b/crawler/scrape.go index 927bb48..f46b651 100644 --- a/crawler/scrape.go +++ b/crawler/scrape.go @@ -7,14 +7,14 @@ import ( log "github.com/sirupsen/logrus" ) -func (app *App) ScrapeHTML(shops []Shop) { +func (app *App) Scrape(shops []Shop) { wait := make(chan bool) count := 0 for _, shop := range shops { - go app.Scrape(shop, wait) + go app.ScrapeShop(shop, wait) count++ } @@ -25,13 +25,13 @@ func (app *App) ScrapeHTML(shops []Shop) { } } -func (app *App) Scrape(shop Shop, wait chan bool) { +func (app *App) ScrapeShop(shop Shop, wait chan bool) { var W []Angebot var err error // retry on error for i := 1; i < 4; i++ { - W = app.ScrapeShop(shop) + W = app.ScrapeHTML(shop) W = sanitize_offer(W, shop, i) @@ -59,7 +59,7 @@ func (app *App) Scrape(shop Shop, wait chan bool) { wait <- true } -func (app *App) ScrapeShop(shop Shop) []Angebot { +func (app *App) ScrapeHTML(shop Shop) []Angebot { switch shop.Name { case "Bottleworld": |
