🔥 删除注释

This commit is contained in:
小锅饭 2025-09-14 23:46:01 +08:00
parent e020bf0d0f
commit 5cbc9329d3
3 changed files with 2 additions and 30 deletions

View File

@ -9,8 +9,6 @@ import (
// ======== RSS ========[START]
// type SingleFeedItem gofeed.Item
func genHashForFeedItem(link, guid string) string {
idString := link + "||" + guid
h := fnv.New32()
@ -51,8 +49,6 @@ type RssSource struct {
Link string `gorm:"column:link" json:"link"`
// UpdatedParsed RSS页面更新时间
UpdatedParsed time.Time `gorm:"column:updated_parsed" json:"updated_parsed"`
//// Ctime create time
// Ctime int64 `gorm:"column:ctime;default:current_timestamp" json:"ctime"`
// Mtime update time
Mtime time.Time `gorm:"column:mtime;default:current_timestamp;" json:"mtime"`
}
@ -83,8 +79,6 @@ type RssContent struct {
Author string `gorm:"column:author" json:"author"`
Thumbnail string `gorm:"column:thumbnail" json:"thumbnail"`
Content string `gorm:"column:content" json:"content"`
//// Ctime create time
// Ctime int64 `gorm:"column:ctime;default:current_timestamp" json:"ctime"`
// Mtime update time
Mtime time.Time `gorm:"column:mtime;default:current_timestamp;" json:"mtime"`
}
@ -109,8 +103,6 @@ type RssSubscribe struct {
GroupID int64 `gorm:"column:group_id;not null;uniqueIndex:uk_sid_gid"`
// 订阅频道
RssSourceID int64 `gorm:"column:rss_source_id;not null;uniqueIndex:uk_sid_gid"`
//// Ctime create time
// Ctime int64 `gorm:"column:ctime;default:current_timestamp" json:"ctime"`
// Mtime update time
Mtime time.Time `gorm:"column:mtime;default:current_timestamp;" json:"mtime"`
}

View File

@ -12,11 +12,6 @@ import (
"github.com/sirupsen/logrus"
)
// const (
// acceptHeader = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
// userHeader = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 Edg/84.0.522.63"
//)
var (
// RSSHubMirrors RSSHub镜像站地址列表第一个为默认地址
rssHubMirrors = []string{
@ -48,10 +43,6 @@ func (c *RssHubClient) FetchFeed(path string) (feed *gofeed.Feed, err error) {
logrus.Errorf("[rsshub FetchFeed] fetch feed error: data is empty")
return nil, errors.New("feed data is empty")
}
// data, err = web.RequestDataWith(c.Client, domain+path, "GET", "", web.RandUA(), nil)
// if err != nil {
// return nil, err
//}
feed, err = gofeed.NewParser().Parse(bytes.NewBuffer(data))
if err != nil {
return

View File

@ -18,19 +18,8 @@ import (
// 初始化 repo
var (
rssRepo domain.RssDomain
initErr error
//// getRssRepo repo 初始化方法,单例
// getRssRepo = ctxext.DoOnceOnSuccess(func(ctx *zero.Ctx) bool {
// logrus.Infoln("RssHub订阅姬初始化")
// rssRepo, initErr = domain.NewRssDomain(engine.DataFolder() + "rsshub.db")
// if initErr != nil {
// ctx.SendChain(message.Text("RssHub订阅姬初始化失败", initErr.Error()))
// return false
// }
// return true
// })
// regexpForSQL 防注入
rssRepo domain.RssDomain
initErr error
regexpForSQL = regexp.MustCompile(`[\^<>\[\]%&\*\(\)\{\}\|\=]|(union\s+select|update\s+|delete\s+|drop\s+|truncate\s+|insert\s+|exec\s+|declare\s+)`)
)