mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
fix sb bug
This commit is contained in:
parent
8992999024
commit
5b85a300d4
@ -30,6 +30,7 @@ class Arknights(metaclass=Singleton):
|
||||
if announce['announceId'] in self.exists_posts['default']:
|
||||
continue
|
||||
res.append(await self.parse(announce['webUrl']))
|
||||
self.exists_posts['default'].add(announce['announceId'])
|
||||
if None in res:
|
||||
res.remove(None)
|
||||
return res
|
||||
@ -49,6 +50,7 @@ class Arknights(metaclass=Singleton):
|
||||
pics.append(pic['src'])
|
||||
else:
|
||||
return None
|
||||
return Post('arknights', '', announce_url, pics=pics)
|
||||
|
||||
async def fetch_new_post(self, _) -> list[Post]:
|
||||
try:
|
||||
|
@ -13,6 +13,8 @@ class Post:
|
||||
text_msg = '来源: {}\n{}'.format(self.target_type, self.text)
|
||||
if self.target_type == 'rss':
|
||||
res = [await parse_text(text_msg)]
|
||||
elif self.target_type == 'arknights':
|
||||
res = []
|
||||
else:
|
||||
res = [await parse_text(text_msg), self.url]
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user