update PlatformNoTarget

This commit is contained in:
felinae98 2021-02-16 21:28:30 +08:00
parent 6bdcdc3242
commit acd44a1269
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

@ -260,6 +260,7 @@ class PlatformNoTarget(PlatformProto):
return res
async def fetch_new_post(self, users: list[User]) -> list[tuple[User, list[Post]]]:
try:
config = Config()
post_list = await self.get_sub_list()
new_posts = await self.filter_common(post_list)
@ -279,3 +280,6 @@ class PlatformNoTarget(PlatformProto):
res.append((user, user_post))
self.cache = {}
return res
except httpx.RequestError as err:
logger.warning("network connection error: {}, url: {}".format(type(err), err.request.url))
return []