提交 33b19bea 编写于 作者: S shi.zeyuan

1.修正比赛时间bug

上级 e115b395
......@@ -14,7 +14,7 @@ func main() {
parse2 := add.Format( "2006")
fmt.Println(parse)
fmt.Println(parse2)
launch.Spider_leagueSeason()
launch.Spider_History()
}
......
......@@ -72,10 +72,15 @@ func Spider_History() {
for _, v := range seasons {
Spider_match_his(v)
time.Sleep(58 * time.Minute)
Spider_baseFace_his(v)
time.Sleep(58 * time.Minute)
Spider_asiaLastNew_his(v)
time.Sleep(58 * time.Minute)
Spider_euroLast_his(v)
time.Sleep(58 * time.Minute)
Spider_euroHis_his(v)
time.Sleep(58 * time.Minute)
}
}
......@@ -103,7 +103,6 @@ func (this *LeagueSeasonProcesser) season_process(htmlParser *goquery.Document,
temp_id = strings.Replace(temp_id, "ToAnaly(", "", 1)
temp_id = strings.Replace(temp_id, ",-1)", "", 1)
temp_id = strings.TrimSpace(temp_id)
base.Log.Info("比赛ID为:", temp_id)
val_arr := make([]string, 0)
selection.Find("td").Each(func(i int, selection *goquery.Selection) {
......@@ -117,9 +116,8 @@ func (this *LeagueSeasonProcesser) season_process(htmlParser *goquery.Document,
index := 0
//比赛时间
index++
temp_matchDate := val_arr[index]
month, _ := strconv.Atoi(temp_matchDate[:1])
month, _ := strconv.Atoi(temp_matchDate[:2])
beginMonth = month
})
}
......
......@@ -119,8 +119,8 @@ func (this *MatchHisProcesser) Process(p *page.Page) {
seasonYear := season.Season
if strings.Contains(season.Season, "-") {
season_arr := strings.Split(season.Season, "-")
month, _ := strconv.Atoi(temp_matchDate[:1])
if month < season.BeginMonth {
month, _ := strconv.Atoi(temp_matchDate[:2])
if month >= season.BeginMonth {
seasonYear = season_arr[0]
} else {
seasonYear = season_arr[1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册