This commit is contained in:
SiHuan 2020-12-26 20:31:53 +08:00
parent 4494986292
commit 9ea6965985

View file

@ -44,7 +44,7 @@ class Ans(StdAns):
try:
d = feedparser.parse(suburl)
title = d.feed.title
lastUpdated = d.feed.updated
lastUpdated = d.entries[0].published
except:
return "咱好像没能成功订阅 (╥_╥)"
@ -89,13 +89,13 @@ class Ans(StdAns):
except:
self.sendmsg(f"咱抓取不到 《{sub['title']}》!")
continue
if d.feed.updated == sub['lastUpdated']:
if d.entries[0].published == sub['lastUpdated']:
continue
newfeedtitle = d.entries[0].title
newfeedlink = d.entries[0].link
self.push(sub['title'], newfeedtitle, newfeedlink)
nowdata['allSub'][sub['url']]['lastUpdated'] = d.feed.updated
nowdata['allSub'][sub['url']]['lastUpdated'] = d.entries[0].published
self.DATASET({gid:json.dumps(nowdata)})
elif cmd == 'disable':