易班晚打卡,roll转盘,一言二次元语录

This commit is contained in:
NothAmor
2023-07-17 21:34:21 +08:00
parent 42fb64b4b5
commit 7e33494f19
14 changed files with 248 additions and 105 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -5,4 +5,10 @@ DouYin:
router:
api: api
download: download
douyin_video_data: douyin_video_data
douyin_video_data: douyin_video_data
YiBan:
protocol: http
address: 124.221.152.192
port: "5002"
router:
signIn: api/yiban_sign

View File

@@ -2,4 +2,5 @@ package config
type Config struct {
DouYin DouYin `mapstructure:"DouYin" json:"DouYin" yaml:"DouYin"`
YiBan YiBan `mapstructure:"YiBan" json:"YiBan" yaml:"YiBan"`
}

10
config/yiban.go Normal file
View File

@@ -0,0 +1,10 @@
package config
type YiBan struct {
Protocol string `yaml:"protocol"`
Address string `yaml:"address"`
Port string `yaml:"port"`
Router struct {
SignIn string `yaml:"signIn"`
} `yaml:"router"`
}

View File

@@ -1,13 +1,13 @@
package controller
import (
"bytes"
"encoding/json"
"fmt"
"go-bot/bot/global"
"go-bot/bot/structs"
"io/ioutil"
"net/http"
"os"
"strings"
"github.com/eatmoreapple/openwechat"
@@ -23,44 +23,60 @@ func DouYinResolution(msg *openwechat.Message) {
return
}
// 获取抖音链接
douyinUrl := split[1]
douYinUrl := msg.Content[3:]
// 获取抖音视频信息
data, err := GetDouYinUrlInfo(douyinUrl)
data, err := GetDouYinUrlInfo(douYinUrl)
if err != nil {
fmt.Printf("获取抖音信息失败, 失败原因: %s\n", err.Error())
msg.ReplyText(fmt.Sprintf("获取抖音信息失败, 失败原因: %s", err.Error()))
return
}
// 图片解析
if data.Type == "image" {
msg.ReplyText(fmt.Sprintf("解析类型: %s\n解析时长: %f\n图片ID: %s\n图片描述: %s\n作者昵称: %s\n作者ID: %s\n", data.Type, data.TotalTime, data.AwemeID, data.Desc, data.Author.Nickname, data.Author.UID))
msg.ReplyText(fmt.Sprintf("解析类型: 图集\n解析时长: %f\n图片ID: %s\n图片描述: %s\n作者昵称: %s\n作者ID: %s\n", data.TotalTime, data.AwemeID, data.Desc, data.Author.Nickname, data.Author.UID))
text := ""
for _, imageUrl := range data.ImageData.NoWatermarkImageList {
image, err := DownloadPic(imageUrl)
if err != nil {
msg.ReplyText(fmt.Sprintf("下载图片失败, 失败原因: %s", err.Error()))
return
}
text = text + "1. " + imageUrl + "\n"
// data, err := DownloadFile(imageUrl)
// if err != nil {
// fmt.Printf("下载图片失败失败, 失败原因: %s\n", err.Error())
// msg.ReplyText(fmt.Sprintf("下载图片失败, 失败原因: %s", err.Error()))
// return
// }
msg.ReplyImage(image)
// _, err = msg.ReplyImage(bytes.NewReader(data))
// if err != nil {
// fmt.Printf("发送图片失败, 失败原因: %s\n", err.Error())
// msg.ReplyText(fmt.Sprintf("发送图片失败, 失败原因: %s", err.Error()))
// return
// }
}
msg.ReplyText(text)
return
}
// 视频解析
if data.Type == "video" {
msg.ReplyText(fmt.Sprintf("解析类型: %s\n解析时长: %f\n视频ID: %s\n视频描述: %s\n作者昵称: %s\n作者ID: %s\n", data.Type, data.TotalTime, data.AwemeID, data.Desc, data.Author.Nickname, data.Author.UID))
msg.ReplyText(fmt.Sprintf("解析类型: 视频\n解析时长: %f\n视频ID: %s\n视频描述: %s\n作者昵称: %s\n作者ID: %s\n", data.TotalTime, data.AwemeID, data.Desc, data.Author.Nickname, data.Author.UID))
video, err := DownloadVideo(data.VideoData.NwmVideoURLHQ)
data, err := DownloadFile(data.VideoData.NwmVideoURLHQ)
if err != nil {
fmt.Printf("下载视频失败, 失败原因: %s\n", err.Error())
msg.ReplyText(fmt.Sprintf("下载视频失败, 失败原因: %s", err.Error()))
return
}
msg.ReplyVideo(video)
_, err = msg.ReplyVideo(bytes.NewReader(data))
if err != nil {
fmt.Printf("发送视频失败, 失败原因: %s\n", err.Error())
msg.ReplyText(fmt.Sprintf("发送视频失败, 失败原因: %s", err.Error()))
return
}
return
}
}
@@ -71,14 +87,7 @@ func GetDouYinUrlInfo(url string) (resolutionResponse structs.ResolutionResponse
// 拼接GET链接请求API服务
resolutionApiUrl := fmt.Sprintf("%s://%s:%s/%s?url=%s", global.Config.DouYin.Protocol, global.Config.DouYin.Address, global.Config.DouYin.Port, global.Config.DouYin.Router.Api, url)
client := &http.Client{}
req, err := http.NewRequest("GET", resolutionApiUrl, nil)
if err != nil {
err = fmt.Errorf("请求链接错误: %s", err)
return
}
resp, err := client.Do(req)
resp, err := http.Get(resolutionApiUrl)
if err != nil {
err = fmt.Errorf("请求链接错误: %s", err)
return
@@ -86,7 +95,15 @@ func GetDouYinUrlInfo(url string) (resolutionResponse structs.ResolutionResponse
defer resp.Body.Close()
err = json.NewDecoder(resp.Body).Decode(&resolutionResponse)
// 读取返回数据
resolutionBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
err = fmt.Errorf("读取返回数据错误: %s", err)
return
}
// 解析返回数据
err = json.Unmarshal(resolutionBytes, &resolutionResponse)
if err != nil {
err = fmt.Errorf("解析返回数据错误: %s", err)
return
@@ -100,9 +117,9 @@ func GetDouYinUrlInfo(url string) (resolutionResponse structs.ResolutionResponse
return
}
// DownloadPic 下载图片
// DownloadVideo 下载文件
// Author: NothAmor
func DownloadPic(url string) (image *os.File, err error) {
func DownloadFile(url string) (data []byte, err error) {
resp, err := http.Get(url)
if err != nil {
err = fmt.Errorf("请求链接错误: %s", err)
@@ -110,68 +127,11 @@ func DownloadPic(url string) (image *os.File, err error) {
}
defer resp.Body.Close()
imageBytes, err := ioutil.ReadAll(resp.Body)
data, err = ioutil.ReadAll(resp.Body)
if err != nil {
err = fmt.Errorf("读取返回数据错误: %s", err)
return
}
tmpFile, err := ioutil.TempFile("", "image*.jpg")
if err != nil {
err = fmt.Errorf("创建临时文件错误: %s", err)
return
}
defer tmpFile.Close()
_, err = tmpFile.Write(imageBytes)
if err != nil {
err = fmt.Errorf("写入临时文件错误: %s", err)
return
}
_, err = tmpFile.Seek(0, 0)
if err != nil {
err = fmt.Errorf("设置临时文件指针错误: %s", err)
return
}
return tmpFile, nil
}
// DownloadVideo 下载视频
// Author: NothAmor
func DownloadVideo(url string) (video *os.File, err error) {
resp, err := http.Get(url)
if err != nil {
err = fmt.Errorf("请求链接错误: %s", err)
return
}
defer resp.Body.Close()
videoBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
err = fmt.Errorf("读取返回数据错误: %s", err)
return
}
tmpFile, err := ioutil.TempFile("", "video*.mp4")
if err != nil {
err = fmt.Errorf("创建临时文件错误: %s", err)
return
}
defer tmpFile.Close()
_, err = tmpFile.Write(videoBytes)
if err != nil {
err = fmt.Errorf("写入临时文件错误: %s", err)
return
}
_, err = tmpFile.Seek(0, 0)
if err != nil {
err = fmt.Errorf("设置临时文件指针错误: %s", err)
return
}
return tmpFile, nil
return
}

41
controller/hitokoto.go Normal file
View File

@@ -0,0 +1,41 @@
package controller
import (
"encoding/json"
"fmt"
"go-bot/bot/structs"
"io/ioutil"
"net/http"
"github.com/eatmoreapple/openwechat"
)
func Hitokoto(msg *openwechat.Message) {
url := "https://international.v1.hitokoto.cn/?c=a"
resp, err := http.Get(url)
if err != nil {
err = fmt.Errorf("请求API失败, 失败原因: %s", err.Error())
msg.ReplyText(err.Error())
return
}
defer resp.Body.Close()
resolutionBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
err = fmt.Errorf("读取返回数据错误: %s", err)
msg.ReplyText(err.Error())
return
}
var response structs.Hitokoto
err = json.Unmarshal(resolutionBytes, &response)
if err != nil {
err = fmt.Errorf("解析返回数据错误: %s", err)
msg.ReplyText(err.Error())
return
}
msg.ReplyText(fmt.Sprintf("一言二次元语录:\n%s\n--%s", response.Hitokoto, response.From))
}

33
controller/roll.go Normal file
View File

@@ -0,0 +1,33 @@
package controller
import (
"fmt"
"math/rand"
"strings"
"time"
"github.com/eatmoreapple/openwechat"
)
func Roll(msg *openwechat.Message, self *openwechat.Self) {
randomText := []string{
"转动命运的齿轮,拨开眼前迷雾...",
fmt.Sprintf("启动吧,命运的水晶球,为%s指引方向", self.NickName),
fmt.Sprintf("在此祈愿,请为%s降下指引...", self.NickName),
}
answerText := []string{
"让我们来看看是什么结果!答案是:'%s'",
"根据命运的指引,接下来 '%s' 会比较好",
"祈愿被回应了!是 '%s'",
"结束了,命运之轮停在了 '%s'",
}
choices := strings.Split(msg.Content, " ")[1:]
msg.ReplyText(randomText[rand.Intn(len(randomText))])
time.Sleep(1 * time.Second)
msg.ReplyText(fmt.Sprintf(answerText[rand.Intn(len(answerText))], choices[rand.Intn(len(choices))]))
}

View File

@@ -2,22 +2,23 @@ package controller
import (
"fmt"
"github.com/eatmoreapple/openwechat"
"github.com/kirinlabs/HttpRequest"
)
type name struct {
weatherAPI string "https://dashboard.caiyunapp.com/"
}
func GetWeather(msg *openwechat.Message, self *openwechat.Self) {
get, err := HttpRequest.JSON().Get("https://api.caiyunapp.com/v2.6/y1BgC9gnutIzXlZF/126.62,45.62/realtime?alert=true")
if err != nil {
err = fmt.Errorf("请求失败: %s", err)
msg.ReplyText(err.Error())
return
}
body, err := get.Body()
if err != nil {
err = fmt.Errorf("获取响应体失败: %s", err)
msg.ReplyText(err.Error())
return
}
groups, err := self.Groups()

67
controller/yiban.go Normal file
View File

@@ -0,0 +1,67 @@
package controller
import (
"encoding/json"
"fmt"
"go-bot/bot/global"
"go-bot/bot/structs"
"io/ioutil"
"net/http"
"strings"
"github.com/eatmoreapple/openwechat"
)
// YiBanSign 易班签到
// Author NothAmor
func YiBanSign(msg *openwechat.Message) {
split := strings.Split(msg.Content, " ")
if len(split) != 3 {
fmt.Println("签到失败, 请检查格式是否正确")
msg.ReplyText("签到失败, 请检查格式是否正确")
return
}
username := split[1]
password := split[2]
response, err := YiBanRequest(username, password)
if err != nil {
fmt.Printf("签到失败, 失败原因: %s\n", err.Error())
msg.ReplyText(fmt.Sprintf("签到失败, 失败原因: %s", err.Error()))
return
} else {
fmt.Printf("签到成功, 签到信息: %s\n", response.Msg)
msg.ReplyText(fmt.Sprintf("签到成功, 签到信息: %s", response.Msg))
return
}
}
// YiBanRequest 易班打卡请求
// Author NothAmor
func YiBanRequest(username string, password string) (response structs.YiBanResponse, err error) {
url := fmt.Sprintf("%s://%s:%s/%s?username=%s&password=%s", global.Config.YiBan.Protocol, global.Config.YiBan.Address, global.Config.YiBan.Port, global.Config.YiBan.Router.SignIn, username, password)
resp, err := http.Get(url)
if err != nil {
err = fmt.Errorf("请求API失败, 失败原因: %s", err.Error())
return
}
defer resp.Body.Close()
resolutionBytes, err := ioutil.ReadAll(resp.Body)
if err != nil {
err = fmt.Errorf("读取返回数据错误: %s", err)
return
}
err = json.Unmarshal(resolutionBytes, &response)
if err != nil {
err = fmt.Errorf("解析API返回数据失败, 失败原因: %s", err.Error())
return
}
return
}

BIN
main

Binary file not shown.

38
main.go
View File

@@ -56,8 +56,8 @@ func main() {
//fmt.Println(friends, err)
// 获取所有的群组
groups, err := self.Groups()
fmt.Println(groups, err)
// groups, err := self.Groups()
// fmt.Println(groups, err)
//链接数据库
database.Database()
@@ -70,41 +70,53 @@ func main() {
fmt.Printf("command: %s \n", split)
if split[0] == "英语" {
controller.SingleChoice(msg)
go controller.SingleChoice(msg)
}
if split[0] == "打卡开启" {
controller.SignInBegin(msg, self)
go controller.SignInBegin(msg, self)
}
if split[0] == "打卡关闭" {
controller.SignInEnd(msg, self, "叫啥好呢")
go controller.SignInEnd(msg, self, "叫啥好呢")
}
if split[0] == "今日打卡" {
controller.SignIn(msg, self)
go controller.SignIn(msg, self)
}
if split[0] == "天气" {
controller.GetWeather(msg, self)
go controller.GetWeather(msg, self)
}
if split[0] == "语录" || split[0] == "二次元语录" {
go controller.Hitokoto(msg)
}
if split[0] == "roll" {
go controller.Roll(msg, self)
}
if split[0] == "抖音" || split[0] == "dy" {
controller.DouYinResolution(msg)
go controller.DouYinResolution(msg)
}
if split[0] == "易班" || split[0] == "yb" {
go controller.YiBanSign(msg)
}
if split[0] == "school" && split[1] == "start" {
controller.SchoolSignInBegin(msg, self)
go controller.SchoolSignInBegin(msg, self)
}
if split[0] == "school" && split[1] == "end" {
controller.SignInEnd(msg, self, "四大天王")
go controller.SignInEnd(msg, self, "四大天王")
}
if split[0] == "我的信息" {
controller.GetUsers(msg, self)
go controller.GetUsers(msg, self)
}
if split[0] == "all start" {
controller.SignInBegin(msg, self)
controller.SchoolSignInBegin(msg, self)
go controller.SignInBegin(msg, self)
go controller.SchoolSignInBegin(msg, self)
}
}
}

View File

@@ -1 +1 @@
{"Cookies":{"https://login.wx.qq.com/cgi-bin/mmwebwx-bin/login":[],"https://login.wx.qq.com/jslogin":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit":[],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage":[{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxsid","Value":"EPQzoP7IxyCHyMY0","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxsid=EPQzoP7IxyCHyMY0; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxloadtime","Value":"1664845538","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxloadtime=1664845538; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"mm_lang","Value":"zh_CN","Path":"/","Domain":"wx2.qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"mm_lang=zh_CN; Domain=wx2.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"wxuin","Value":"2194844303","Path":"/","Domain":".qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"wxuin=2194844303; Domain=.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"webwx_data_ticket","Value":"gScltan9duBM3UAm7Iz7vTMY","Path":"/","Domain":".qq.com","Expires":"2022-10-04T13:05:38Z","RawExpires":"Tue, 04-Oct-2022 13:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_data_ticket=gScltan9duBM3UAm7Iz7vTMY; Domain=.qq.com; Path=/; Expires=Tue, 04-Oct-2022 13:05:38 GMT; Secure","Unparsed":null},{"Name":"webwx_auth_ticket","Value":"CIsBELfY348HGoAB1bEXeXSExPlTveEHTYfIRtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEntxKCjKO69/58hmSbNfl+sP//TALpLd55Y/iDxswwgU=","Path":"/","Domain":"wx2.qq.com","Expires":"2032-10-01T01:05:38Z","RawExpires":"Fri, 01-Oct-2032 01:05:38 GMT","MaxAge":0,"Secure":true,"HttpOnly":false,"SameSite":0,"Raw":"webwx_auth_ticket=CIsBELfY348HGoAB1bEXeXSExPlTveEHTYfIRtvAr98TGctTy/UR5nB2zCLi7ndb0vpAetTyM+MW9Rt0Zhgz5A8unE96TXkHZKEspTK4EfQfAQ98OHhjN6Lx3Z/OIQN/AnRKGpH5iBfCYunEntxKCjKO69/58hmSbNfl+sP//TALpLd55Y/iDxswwgU=; Domain=wx2.qq.com; Path=/; Expires=Fri, 01-Oct-2032 01:05:38 GMT; Secure","Unparsed":null}],"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify":[]},"BaseRequest":{"Uin":2194844303,"Sid":"EPQzoP7IxyCHyMY0","Skey":"@crypt_f512dfa9_e59cfb13b99cab886a7791d5ebc47588","DeviceID":"e645681736316510"},"LoginInfo":{"Ret":0,"WxUin":2194844303,"IsGrayScale":1,"Message":"","SKey":"@crypt_f512dfa9_e59cfb13b99cab886a7791d5ebc47588","WxSid":"EPQzoP7IxyCHyMY0","PassTicket":"SRn505Jx0egg9URdx0%2ByiTLXLOfKeMV84xipC0genmDim1oxmu2Kr2rx3fbH%2Fw18"},"WechatDomain":"wx2.qq.com","UUID":"IYHYq7hszg=="}
{"Jar":{"PsList":null,"Entries":{"qq.com":{"qq.com;/;webwx_data_ticket":{"Name":"webwx_data_ticket","Value":"gSdjmChi6Ki3WqeP0wQaHpMp","Domain":"qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:09:26Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.636509+08:00"},"qq.com;/;wxuin":{"Name":"wxuin","Value":"2630901142","Domain":"qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:07:27Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.314646+08:00"},"wx.qq.com;/;mm_lang":{"Name":"mm_lang","Value":"zh_CN","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:07:27Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.314646+08:00"},"wx.qq.com;/;webwx_auth_ticket":{"Name":"webwx_auth_ticket","Value":"CIsBEM2e+tcLGmBNzB26Ez5W19ULRyqD37BB+3xiYVizwsisBqso8n3krkALMdyrqf1D7ZDLYbVu/kMuOXmtCict5xUBwbyOSr8SSBxewc6AUSJyd9BdnW+hzV0f5Intg6/aa6mO0cv+et0=","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2033-07-14T13:07:27Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.314646+08:00"},"wx.qq.com;/;webwxuvid":{"Name":"webwxuvid","Value":"0978248fcda8a604ef24666a4ab22102ba8ccf6fd00d86a365535129c3e25bc0","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2033-07-14T10:24:39Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.314646+08:00"},"wx.qq.com;/;wxloadtime":{"Name":"wxloadtime","Value":"1689599247_expired","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:07:30Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.314646+08:00"},"wx.qq.com;/;wxpluginkey":{"Name":"wxpluginkey","Value":"1689594001","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:09:26Z","Creation":"2023-07-17T18:24:42.68628+08:00","LastAccess":"2023-07-17T21:09:26.636509+08:00"},"wx.qq.com;/;wxsid":{"Name":"wxsid","Value":"h0/iGxg3lQHGKzO4","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-18T01:09:26Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.636509+08:00"},"wx.qq.com;/;wxuin":{"Name":"wxuin","Value":"2630901142","Domain":"wx.qq.com","Path":"/","SameSite":"","Secure":true,"HttpOnly":false,"Persistent":true,"HostOnly":false,"Expires":"2023-07-20T13:09:26Z","Creation":"2023-07-17T18:24:39.997331+08:00","LastAccess":"2023-07-17T21:09:26.636509+08:00"}}},"NextSeqNum":9},"BaseRequest":{"Uin":2630901142,"Sid":"h0/iGxg3lQHGKzO4","Skey":"@crypt_ed112e10_70371682ced2c28907eacc3630ba18bb","DeviceID":"e084625014365036"},"LoginInfo":{"Ret":0,"WxUin":2630901142,"IsGrayScale":1,"Message":"","SKey":"@crypt_ed112e10_70371682ced2c28907eacc3630ba18bb","WxSid":"h0/iGxg3lQHGKzO4","PassTicket":"5h5JaNJ59daDaZzOMjFdn3l0ZpQQffcU8%2FnCHhjzkOB9Vp4tWT%2BIcyc5iAJjC7%2Bb"},"WechatDomain":"wx.qq.com","SyncKey":{"Count":14,"List":[{"Key":1,"Val":795811402},{"Key":2,"Val":795811613},{"Key":3,"Val":795811458},{"Key":11,"Val":795811436},{"Key":19,"Val":33587},{"Key":23,"Val":1689599247},{"Key":24,"Val":1689599366},{"Key":27,"Val":2276610},{"Key":201,"Val":1689599366},{"Key":202,"Val":1689597808},{"Key":203,"Val":1689597346},{"Key":206,"Val":101},{"Key":1000,"Val":1689594001},{"Key":1001,"Val":1689594122}]},"UUID":"oaxczZAxHQ=="}

6
structs/hitokoto.go Normal file
View File

@@ -0,0 +1,6 @@
package structs
type Hitokoto struct {
Hitokoto string `json:"hitokoto"`
From string `json:"from"`
}

6
structs/yiban.go Normal file
View File

@@ -0,0 +1,6 @@
package structs
type YiBanResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
}