Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5062a5e

Browse files
committed
控制频率
1 parent 980cfbb commit 5062a5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/logic/auto_crawl.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"regexp"
1818
"strconv"
1919
"strings"
20+
"time"
2021

2122
"github.com/PuerkitoBio/goquery"
2223
"github.com/polaris1119/config"
@@ -118,8 +119,9 @@ func (self AutoCrawlLogic) crawlOneWebsite(autoCrawlConf *model.AutoCrawlRule, i
118119
}
119120
if err != nil {
120121
logger.Errorln("parse article url", curUrl, "error:", err)
121-
break
122122
}
123+
124+
time.Sleep(30 * time.Second)
123125
}
124126
}
125127
}

0 commit comments

Comments
 (0)