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) }
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) }