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