Browse Source

修改打印日志

main
燕鹏 4 years ago
parent
commit
182db53ae8
  1. 2
      conf.ini
  2. 5
      jd_seckill/seckill.go

2
conf.ini

@ -10,7 +10,7 @@ sku_id = 100012043978
# 抢购数量
seckill_num = 2
# 抢购开始时间设定 2021-01-01 09:59:59 (PS.预约成功后会自动更新)
buy_time = 2021-01-08 09:59:56
buy_time = 2021-01-26 09:59:59
# 抢购总时间,单位:分钟,默认两分钟
seckill_time =
# 抢购任务数量,默认5个

5
jd_seckill/seckill.go

@ -185,6 +185,7 @@ func (this *Seckill) MakeReserve() {
}
}
// 获取抢购链接
func (this *Seckill) getSeckillUrl() (string, error) {
skuId := this.conf.MustValue("config", "sku_id", "")
req := httpc.NewRequest(this.client)
@ -272,7 +273,11 @@ func (this *Seckill) SeckillInitInfo() (string, error) {
log.Println("获取秒杀初始化信息成功")
return body, nil
} else {
if len(body) < 200 {
log.Println("获取秒杀初始化信息失败,返回信息:" + body)
} else {
log.Println("获取秒杀初始化信息失败,返回信息: 网页")
}
errorMsg = body
}
errorCount = errorCount - 1

Loading…
Cancel
Save