Merge pull request #329 from scyxdd/fix-webtitle

修复获取WebTitle的Bug
This commit is contained in:
影舞者 2024-01-15 16:31:14 +08:00 committed by GitHub
commit eefd29d102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,7 +197,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])