This commit is contained in:
影舞者
2022-06-13 10:27:23 +08:00
parent a2573e10bb
commit fdffb369c9
2 changed files with 22 additions and 24 deletions
+2 -2
View File
@@ -189,7 +189,7 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
}
func gettitle(body []byte) (title string) {
re := regexp.MustCompile("(?ims)<title>(.*)</title>")
re := regexp.MustCompile("(?ims)<title>(.*?)</title>")
find := re.FindSubmatch(body)
if len(find) > 1 {
title = string(find[1])
@@ -217,7 +217,7 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
return
}
socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout) * time.Second)
socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout)*time.Second)
if err != nil {
return
}