get title fix
This commit is contained in:
parent
5f5e69a298
commit
43000b45f2
|
@ -110,7 +110,7 @@ func addFormHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error reading link", url, ":", err)
|
fmt.Println("Error reading link", url, ":", err)
|
||||||
} else {
|
} else {
|
||||||
re := regexp.MustCompile("< *[Tt][Ii][Tt][Ll][Ee] *>(.*)< *[Tt][Ii][Tt][Ll][Ee] *>")
|
re := regexp.MustCompile("< *[Tt][Ii][Tt][Ll][Ee] *>(.*)</ *[Tt][Ii][Tt][Ll][Ee] *>")
|
||||||
title := re.FindStringSubmatch(string(body))
|
title := re.FindStringSubmatch(string(body))
|
||||||
fmt.Println(title)
|
fmt.Println(title)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue