summaryrefslogtreecommitdiff
path: root/crawler/utility.go
diff options
context:
space:
mode:
authorMax2018-06-15 19:38:04 +0200
committerMax2018-06-15 19:38:04 +0200
commit0026ba55f03c5378d5773459fcdd7c6931ff42a5 (patch)
treec0a6c9b4fd542e4177ce99159e101c5187a56f02 /crawler/utility.go
parentb3b35a1706cd99e0978147a4d1b841381cf48348 (diff)
downloadalkobote-0026ba55f03c5378d5773459fcdd7c6931ff42a5.tar.gz
Introduces central crawler config. (crawler)
Diffstat (limited to 'crawler/utility.go')
-rw-r--r--crawler/utility.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawler/utility.go b/crawler/utility.go
index 5fa78c4..e0acf3f 100644
--- a/crawler/utility.go
+++ b/crawler/utility.go
@@ -10,6 +10,12 @@ import (
"github.com/gocolly/colly"
)
+func customCollector(allowed_urls []string) *colly.Collector {
+ return colly.NewCollector(
+ colly.AllowedDomains(allowed_urls...),
+ )
+}
+
func stringInSlice(a string, list []string) bool {
for _, b := range list {
if b == a {