mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
fix: 塔罗牌Gitcode数据源仓库切换到经由镜像的GitHub源 (#1090)
This commit is contained in:
parent
8fa91a13c3
commit
41d28b71bf
@ -23,7 +23,7 @@ import (
|
|||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"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 {
|
type cardInfo struct {
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
@ -149,7 +149,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
imgpath := cache + "/" + imgname + ".png"
|
imgpath := cache + "/" + imgname + ".png"
|
||||||
err := pool.SendImageFromPool(imgpath, func(pth string) error {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -324,7 +324,7 @@ func poolimg(imgurl, imgname, cache string) (msg message.Segment, err error) {
|
|||||||
aimgfile := file.BOTPATH + "/" + imgfile
|
aimgfile := file.BOTPATH + "/" + imgfile
|
||||||
if file.IsNotExist(aimgfile) {
|
if file.IsNotExist(aimgfile) {
|
||||||
var data []byte
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user