Example #1
0
func main() {
	if len(os.Args) <= 1 {
		fmt.Printf("Please enter url.\n")
		os.Exit(1)
	}
	seed := os.Args[1]
	bot := gobot.NewGoBot()
	setCookies(bot)
	bot.StartCrawl(seed)
}
Example #2
0
func main() {
	if len(os.Args) <= 1 {
		fmt.Printf("Please enter url.\n")
		os.Exit(1)
	}
	file, err := os.Create("bot.log")
	if err != nil {
		log.Fatal(err)
	}
	log.SetOutput(file)
	seed := os.Args[1]
	bot := gobot.NewGoBot()
	setCookies(bot)
	bot.StartCrawl(seed)
}