mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-05 19:36:43 +08:00
update PlatformNoTarget
This commit is contained in:
parent
6bdcdc3242
commit
acd44a1269
@ -260,6 +260,7 @@ class PlatformNoTarget(PlatformProto):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
async def fetch_new_post(self, users: list[User]) -> list[tuple[User, list[Post]]]:
|
async def fetch_new_post(self, users: list[User]) -> list[tuple[User, list[Post]]]:
|
||||||
|
try:
|
||||||
config = Config()
|
config = Config()
|
||||||
post_list = await self.get_sub_list()
|
post_list = await self.get_sub_list()
|
||||||
new_posts = await self.filter_common(post_list)
|
new_posts = await self.filter_common(post_list)
|
||||||
@ -279,3 +280,6 @@ class PlatformNoTarget(PlatformProto):
|
|||||||
res.append((user, user_post))
|
res.append((user, user_post))
|
||||||
self.cache = {}
|
self.cache = {}
|
||||||
return res
|
return res
|
||||||
|
except httpx.RequestError as err:
|
||||||
|
logger.warning("network connection error: {}, url: {}".format(type(err), err.request.url))
|
||||||
|
return []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user