fix: 塔罗牌Gitcode数据源仓库切换到经由镜像的GitHub源 (#1090)

This commit is contained in:
catboss 2025-01-06 13:08:34 +08:00 committed by GitHub
parent 8fa91a13c3
commit 41d28b71bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ import (
"github.com/wdvxdr1123/ZeroBot/message"
)
const bed = "https://gitcode.net/shudorcl/zbp-tarot/-/raw/master/"
const bed = "https://github.moeyy.xyz/https://raw.githubusercontent.com/FloatTech/zbpdata/main/Tarot/"
type cardInfo struct {
Description string `json:"description"`
@ -149,7 +149,7 @@ func init() {
}
imgpath := cache + "/" + imgname + ".png"
err := pool.SendImageFromPool(imgpath, func(pth string) error {
data, err := web.RequestDataWith(web.NewTLS12Client(), imgurl, "GET", "gitcode.net", web.RandUA(), nil)
data, err := web.RequestDataWith(web.NewTLS12Client(), imgurl, "GET", "github.moeyy.xyz", web.RandUA(), nil)
if err != nil {
return err
}
@ -324,7 +324,7 @@ func poolimg(imgurl, imgname, cache string) (msg message.Segment, err error) {
aimgfile := file.BOTPATH + "/" + imgfile
if file.IsNotExist(aimgfile) {
var data []byte
data, err = web.RequestDataWith(web.NewTLS12Client(), imgurl, "GET", "gitcode.net", web.RandUA(), nil)
data, err = web.RequestDataWith(web.NewTLS12Client(), imgurl, "GET", "github.moeyy.xyz", web.RandUA(), nil)
if err != nil {
return
}