diff --git a/api/v1/chat.go b/api/v1/chat.go index 3d6862b8f2..4ffab49778 100644 --- a/api/v1/chat.go +++ b/api/v1/chat.go @@ -141,7 +141,7 @@ func ChatHandler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("\n\n")) flusher.Flush() - if tmp == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" && r.Header.Get("Cookie") == "" { + if (tmp == "User needs to solve CAPTCHA to continue." || tmp == "Request is throttled." || tmp == "Unknown error.") && common.BypassServer != "" && r.Header.Get("Cookie") == "" { go func(cookie string) { t, _ := getCookie(cookie, chat.GetChatHub().GetConversationId(), hex.NewUUID()) if t != "" { @@ -178,7 +178,7 @@ func ChatHandler(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Write(resData) - if text == "User needs to solve CAPTCHA to continue." && common.BypassServer != "" && r.Header.Get("Cookie") == "" { + if (text == "User needs to solve CAPTCHA to continue." || text == "Request is throttled." || text == "Unknown error.") && common.BypassServer != "" && r.Header.Get("Cookie") == "" { go func(cookie string) { t, _ := getCookie(cookie, chat.GetChatHub().GetConversationId(), hex.NewUUID()) if t != "" { diff --git a/go.mod b/go.mod index 9135f215fd..8394c7bce5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21.4 toolchain go1.21.6 require ( - github.com/Harry-zklcdc/bing-lib v1.3.0 + github.com/Harry-zklcdc/bing-lib v1.3.2 github.com/andybalholm/brotli v1.1.0 github.com/refraction-networking/utls v1.6.1 ) diff --git a/go.sum b/go.sum index 5ed3514657..cdeab758ba 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Harry-zklcdc/bing-lib v1.3.0 h1:kVA8EizoDFNrohRVWBSVlOXabstwK3p8mOzZQKKZKiU= -github.com/Harry-zklcdc/bing-lib v1.3.0/go.mod h1:Ruq9Ka/DqdYpKrX0vPUKikH3hn8RDZ8F+rAePRSyKAg= +github.com/Harry-zklcdc/bing-lib v1.3.2 h1:1qdWdK/sAufnha//ZFwW4w4Kq7XqBm+4cQir3/nPmJI= +github.com/Harry-zklcdc/bing-lib v1.3.2/go.mod h1:Ruq9Ka/DqdYpKrX0vPUKikH3hn8RDZ8F+rAePRSyKAg= github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=