summaryrefslogtreecommitdiff
path: root/scrape.go
diff options
context:
space:
mode:
Diffstat (limited to 'scrape.go')
-rw-r--r--scrape.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/scrape.go b/scrape.go
index 764ef39..73908b8 100644
--- a/scrape.go
+++ b/scrape.go
@@ -53,6 +53,7 @@ func NewScraper() *Scraper {
type Scraper struct {
ScrapeFunc ScrapeFunc
+ LoginFunc func()
Script string
Modules []Module
Client *http.Client
@@ -96,6 +97,10 @@ func (s *Scraper) Run() {
}
}
+ if s.LoginFunc != nil {
+ s.LoginFunc()
+ }
+
go s.scrape()
s.wg.Wait()
close(s.jobs)