fix: 修复部分变量命名语义不明确

This commit is contained in:
Relakkes
2023-07-30 21:30:26 +08:00
parent bf659455bb
commit 1d3c2359e0
5 changed files with 10 additions and 8 deletions

View File

@@ -82,14 +82,14 @@ class XHSClient:
async def ping(self) -> bool:
"""get a note to check if login state is ok"""
utils.logger.info("begin to ping xhs...")
utils.logger.info("Begin to ping xhs...")
ping_flag = False
try:
note_card: Dict = await self.get_note_by_keyword(keyword="小红书")
if note_card.get("items"):
ping_flag = True
except Exception as e:
utils.logger.error(f"ping xhs failed: {e}")
utils.logger.error(f"Ping xhs failed: {e}, and try to login again...")
ping_flag = False
return ping_flag