Skip to content

Commit caf218d

Browse files
committed
修改tyc验证码 fix #107 #101 #100 #94 #87
1 parent 061bf50 commit caf218d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/tianyancha/bean.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ func GetReq(url string, data string, options *common.ENOptions) string {
298298
gologger.Errorf("【TYC】需要更新Cookie\n")
299299
} else if resp.StatusCode() == 404 {
300300
gologger.Errorf("【TYC】请求错误 404 %s \n", url)
301+
} else if resp.StatusCode() == 429 {
302+
gologger.Errorf("【TYC】429 请求被拦截,清打开链接滑动验证码,将在10秒后重试 %s \n", url)
303+
time.Sleep(10 * time.Second)
304+
return GetReq(url, data, options)
301305
} else {
302306
gologger.Errorf("【TYC】未知错误 %d\n", resp.StatusCode())
303307
gologger.Debugf("【TYC】\nURL:%s\nDATA:%s\n", url, data)

0 commit comments

Comments
 (0)