diff options
Diffstat (limited to 'cmd/links/links.go')
-rw-r--r-- | cmd/links/links.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/links/links.go b/cmd/links/links.go index 95388ce..e89e22d 100644 --- a/cmd/links/links.go +++ b/cmd/links/links.go @@ -38,7 +38,11 @@ func main() { flag.Parse() seeds := crawl.MustParseURLs(flag.Args()) - scope := crawl.NewSeedScope(seeds, *depth, strings.Split(*validSchemes, ",")) + scope := []crawl.Scope{ + crawl.NewSchemeScope(strings.Split(*validSchemes, ",")), + crawl.NewDepthScope(*depth), + crawl.NewSeedScope(seeds), + } crawler, err := crawl.NewCrawler("crawldb", seeds, scope, crawl.FetcherFunc(http.Get), crawl.HandlerFunc(extractLinks)) if err != nil { |