提交 16ed7cca 编写于 作者: M monomania

1.优化爬虫线程带出的bug

上级 e9d489ce
......@@ -15,8 +15,8 @@ func main() {
fmt.Println(parse)
fmt.Println(parse2)
//launch.Spider_match_his("2019")
//launch.Spider_History()
launch.Spider_leagueSeason()
launch.Spider_History()
//launch.Spider_leagueSeason()
}
[mysql]
#url=root:Meta.123@tcp(mysql.io:3306)/foot?charset=utf8
url=root:awe.FOG5188@tcp(39.108.212.245:3306)/foot?charset=utf8
url=root:Meta.123@tcp(mysql.io:3306)/foot?charset=utf8
#url=root:awe.FOG5188@tcp(39.108.212.245:3306)/foot?charset=utf8
maxIdle=10
maxConn=50
[cookies]
......@@ -23,6 +23,8 @@ cycle_time=48
euro_comp_ids=81,616,104,281,1129
###配置要爬取亚赔的博彩公司ID,使用,间隔,为空或不配置则爬取全部(暂不必,因目前win007提供的新api就是抓取全部)
asia_comp_id=
##是否去爬取联赛信息
league_switch=false
#配置要抓取的历史数据的赛季年份,使用,间隔
history_season=2019
[analy]
......
......@@ -22,6 +22,8 @@ cycle_time=48
euro_comp_ids=81,616,104,281,1129
###配置要爬取亚赔的博彩公司ID,使用,间隔,为空或不配置则爬取全部(暂不必,因目前win007提供的新api就是抓取全部)
asia_comp_id=
##是否去爬取联赛信息
league_switch=false
#配置要抓取的历史数据的赛季年份,使用,间隔
history_season=2018,2019
[analy]
......
......@@ -56,8 +56,11 @@ func Spider_Near() {
}
func Spider_History() {
Spider_league()
Spider_leagueSeason()
league_switch := utils.GetVal("spider", "league_switch")
if len(league_switch) > 0 && strings.EqualFold(league_switch, "true") {
Spider_league()
Spider_leagueSeason()
}
//执行抓取比赛数据
//执行抓取比赛欧赔数据
//执行抓取亚赔数据
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册