Merge branch 'main' of https://github.com/cdle/sillyGirl into main
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/beego/beego/v2/adapter/httplib"
|
"github.com/beego/beego/v2/adapter/httplib"
|
||||||
@@ -52,7 +53,13 @@ func InitReplies() {
|
|||||||
if reply.Request.Disappear {
|
if reply.Request.Disappear {
|
||||||
s.Disappear()
|
s.Disappear()
|
||||||
}
|
}
|
||||||
|
timeUnix := strconv.FormatInt(time.Now().Unix(), 10)
|
||||||
Url := reply.Request.Url
|
Url := reply.Request.Url
|
||||||
|
if strings.Contains(Url, "?") {
|
||||||
|
Url = Url + "&_=" + timeUnix
|
||||||
|
} else {
|
||||||
|
Url = Url + "?_=" + timeUnix
|
||||||
|
}
|
||||||
body := reply.Request.Body
|
body := reply.Request.Body
|
||||||
for k, v := range s.GetMatch() {
|
for k, v := range s.GetMatch() {
|
||||||
Url = strings.Replace(Url, fmt.Sprintf(`{{%d}}`, k+1), v, -1)
|
Url = strings.Replace(Url, fmt.Sprintf(`{{%d}}`, k+1), v, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user