mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
fix:修改vtb语录存为本地路径,去掉bilibilipush缓存 (#130)
* fix:修改vtb语录存为本地路径,去掉bilibilipush缓存 * fix:bilibiliparse添加up和粉丝数,修改bilibilipush的时间 * Update bilibili_parse.go Co-authored-by: Guohuiyuan <haibaraguo@yeahka.com> Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -75,14 +74,8 @@ func init() {
|
||||
// 加载数据库
|
||||
go func() {
|
||||
dbpath := en.DataFolder()
|
||||
cachePath := dbpath + "cache/"
|
||||
dbfile := dbpath + "push.db"
|
||||
defer order.DoneOnExit()()
|
||||
_ = os.RemoveAll(en.DataFolder() + "cache")
|
||||
err := os.MkdirAll(cachePath, 0755)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
bdb = initialize(dbfile)
|
||||
log.Println("[bilibilipush]加载bilibilipush数据库")
|
||||
}()
|
||||
@@ -388,7 +381,7 @@ func sendDynamic() {
|
||||
msg = append(msg, message.Text(cContent+"\n"))
|
||||
case 8:
|
||||
cName := gjson.Get(cOrigin, "owner.name").String()
|
||||
cTime := time.Unix(gjson.Get(cOrigin, "ctime").Int(), 0).Format("2006-01-02 15:04:05")
|
||||
cTime := time.Unix(gjson.Get(cOrigin, "pubdate").Int(), 0).Format("2006-01-02 15:04:05")
|
||||
msg = append(msg, message.Text(cName+"在"+cTime+typeMsg[cOrigType]+"\n"))
|
||||
cTitle := gjson.Get(cOrigin, "title").String()
|
||||
msg = append(msg, message.Text(cTitle))
|
||||
|
||||
Reference in New Issue
Block a user