Skip to content

Commit

Permalink
[feature] add user black list
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrie committed Jan 27, 2023
1 parent cab616d commit ec5df33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/app/spider/picture.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func (p *Picture) spider() error {
bilibili.TopicNameWan: bilibili.TopicIDWan,
bilibili.TopicNameEOE: bilibili.TopicIDEOE,
}
black := map[uint64]struct{}{
383884380: {}, //水图太多,大部分是食物图
}
for topicName, topicID := range topicsMap {
curMaxDynamicID, err := repository.NewBilibiliPicture(p.db).FindMaxDynamicID(topicName)
if err != nil {
Expand Down Expand Up @@ -125,6 +128,9 @@ func (p *Picture) spider() error {
exist = true
break
}
if _, ok := black[v.Desc.UID]; ok {
continue
}
dynamic := &idl.BilibiliDynamic{
UID: v.Desc.UID,
DynamicID: v.Desc.DynamicID,
Expand Down

0 comments on commit ec5df33

Please sign in to comment.