Started working on the crawler

This commit is contained in:
Eduard Urbach 2018-03-08 19:54:08 +01:00
parent 93e848b2aa
commit 2ec5d31c18

20
jobs/crawler/crawler.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"time"
"github.com/aerogo/crawler"
)
const userAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.166 Safari/537.36"
func main() {
malCrawler := crawler.New(userAgent, 1*time.Second, 20000)
malCrawler.Queue(&crawler.Task{
URL: "https://github.com/animenotifier/notify.moe",
Destination: "file.html",
})
malCrawler.Wait()
}