xiexiaoyuan 2 年之前
父节点
当前提交
e0de77c5ef
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 2 3
      services/source_changes_visitors_covid.go
  2. 1 1
      services/task.go

+ 2 - 3
services/source_changes_visitors_covid.go

@@ -12,7 +12,6 @@ import (
 	"hongze/hongze_data_crawler/services/alarm_msg"
 	"hongze/hongze_data_crawler/utils"
 	"io"
-	"log"
 	"os"
 	"path/filepath"
 	"time"
@@ -169,7 +168,7 @@ func GetSourceChangesVisitorsCovid() (filePathStr string, err error) {
 	// create chrome instance
 	ctx, cancel := chromedp.NewContext(
 		allocCtx,
-		chromedp.WithLogf(log.Printf),
+		chromedp.WithLogf(utils.FileLog.Info),
 	)
 	defer cancel()
 
@@ -229,7 +228,7 @@ func GetSourceChangesVisitorsCovid() (filePathStr string, err error) {
 		chromedp.Click(`//div//button[contains(@data-track-note, "chart-download-csv")]`, chromedp.NodeVisible),
 	)
 	if err != nil {
-		log.Fatal(err)
+		//log.Fatal(err)
 		return
 	}
 	//log.Print("end time"+time.Now().Format("2006-01-02_15:04:05.999"))

+ 1 - 1
services/task.go

@@ -11,7 +11,7 @@ func Task() {
 	refreshData := task.NewTask("refreshData", "0 0,30 16-20 * * *", RefreshData)
 	refreshEic := task.NewTask("refreshData", "0 0 2,6 * * *", RefreshEic)
 	refreshCoal := task.NewTask("refreshData", "0 0,30 17-23 * * *", RefreshCoal)
-	refreshVisitors := task.NewTask("RefreshChangesVisitorsCovid","0 10 2-22/1 * * *", RefreshChangesVisitorsCovid )
+	refreshVisitors := task.NewTask("RefreshChangesVisitorsCovid","0 50 2-22/1 * * *", RefreshChangesVisitorsCovid )
 	task.AddTask("数据爬取", refreshData)
 	task.AddTask("欧洲天然气爬取", refreshEic)
 	task.AddTask("中国煤炭网爬取", refreshCoal)