fix rss
This commit is contained in:
parent
4494986292
commit
9ea6965985
1 changed files with 3 additions and 3 deletions
|
@ -44,7 +44,7 @@ class Ans(StdAns):
|
||||||
try:
|
try:
|
||||||
d = feedparser.parse(suburl)
|
d = feedparser.parse(suburl)
|
||||||
title = d.feed.title
|
title = d.feed.title
|
||||||
lastUpdated = d.feed.updated
|
lastUpdated = d.entries[0].published
|
||||||
|
|
||||||
except:
|
except:
|
||||||
return "咱好像没能成功订阅 (╥_╥)"
|
return "咱好像没能成功订阅 (╥_╥)"
|
||||||
|
@ -89,13 +89,13 @@ class Ans(StdAns):
|
||||||
except:
|
except:
|
||||||
self.sendmsg(f"咱抓取不到 《{sub['title']}》!")
|
self.sendmsg(f"咱抓取不到 《{sub['title']}》!")
|
||||||
continue
|
continue
|
||||||
if d.feed.updated == sub['lastUpdated']:
|
if d.entries[0].published == sub['lastUpdated']:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
newfeedtitle = d.entries[0].title
|
newfeedtitle = d.entries[0].title
|
||||||
newfeedlink = d.entries[0].link
|
newfeedlink = d.entries[0].link
|
||||||
self.push(sub['title'], newfeedtitle, newfeedlink)
|
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)})
|
self.DATASET({gid:json.dumps(nowdata)})
|
||||||
|
|
||||||
elif cmd == 'disable':
|
elif cmd == 'disable':
|
||||||
|
|
Loading…
Reference in a new issue