1. 添加了block twitch 视频流的插件.
2. 流量减少99% 3. cpu使用率降低50% 4. 速度提高了400%
This commit is contained in:
@@ -70,12 +70,12 @@ func (or *OpenrecRanking) Execute(cxt *hunter.TaskContext) {
|
||||
tp := cxt.Temporary()
|
||||
|
||||
content := resp.Content()
|
||||
if len(content) <= 200 { // 末页退出
|
||||
if len(content) <= 200 { //末页时没有内容返回, 末页退出
|
||||
finishpoint := time.Now()
|
||||
log.Println("任务Ranking UserId结束休眠, 下次启动时间:", finishpoint.Add(time.Minute*120))
|
||||
for time.Now().Sub(finishpoint) < time.Minute*120 {
|
||||
time.Sleep(time.Second)
|
||||
if atomic.LoadInt32(&loop) > 0 {
|
||||
if atomic.LoadInt32(&loop) <= 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -122,6 +122,7 @@ func (or *OpenrecRanking) Execute(cxt *hunter.TaskContext) {
|
||||
}
|
||||
}
|
||||
|
||||
// 修改url query 参数的page递增. 遍历所有页面
|
||||
querys := tp.GetQuery()
|
||||
page, err := strconv.Atoi(querys.Get("page"))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user