Merge branch 'main' of https://github.com/cdle/sillyGirl into main

This commit is contained in:
cdle
2021-10-16 17:48:21 +08:00
+7
View File
@@ -6,6 +6,7 @@ import (
"net/url"
"regexp"
"strings"
"strconv"
"time"
"github.com/beego/beego/v2/adapter/httplib"
@@ -52,7 +53,13 @@ func InitReplies() {
if reply.Request.Disappear {
s.Disappear()
}
timeUnix := strconv.FormatInt(time.Now().Unix(), 10)
Url := reply.Request.Url
if strings.Contains(Url, "?") {
Url = Url + "&_=" + timeUnix
} else {
Url = Url + "?_=" + timeUnix
}
body := reply.Request.Body
for k, v := range s.GetMatch() {
Url = strings.Replace(Url, fmt.Sprintf(`{{%d}}`, k+1), v, -1)