mirror of
https://github.com/Xtao-Labs/twitter2telegram.git
synced 2024-11-25 01:29:44 +00:00
fix: fail user notice
This commit is contained in:
parent
254a0d22e7
commit
b9ad65b01b
@ -120,7 +120,7 @@ async def async_get_user(user_data: Dict, username: str) -> None:
|
|||||||
logs.warning(f"获取 {username} 的数据失败,未知原因")
|
logs.warning(f"获取 {username} 的数据失败,未知原因")
|
||||||
except UsernameNotFound:
|
except UsernameNotFound:
|
||||||
logs.warning(f"获取 {username} 的数据失败,可能用户名已改变")
|
logs.warning(f"获取 {username} 的数据失败,可能用户名已改变")
|
||||||
user_data[username] = UsernameNotFound
|
user_data[username] = UsernameNotFound()
|
||||||
except Exception:
|
except Exception:
|
||||||
logs.error(f"获取 {username} 的数据失败")
|
logs.error(f"获取 {username} 的数据失败")
|
||||||
user_data[username] = None
|
user_data[username] = None
|
||||||
@ -152,6 +152,9 @@ async def check_update():
|
|||||||
elif isinstance(user_data, UsernameNotFound):
|
elif isinstance(user_data, UsernameNotFound):
|
||||||
logs.warning(f"获取 {username} 的数据失败,可能用户名已改变")
|
logs.warning(f"获取 {username} 的数据失败,可能用户名已改变")
|
||||||
failed_users.append(username)
|
failed_users.append(username)
|
||||||
|
else:
|
||||||
|
logs.error(f"获取 {username} 的数据失败,未知原因")
|
||||||
|
failed_users.append(username)
|
||||||
if check:
|
if check:
|
||||||
logs.info(f"处理完成,剩余 {nums - idx - 1} 个用户")
|
logs.info(f"处理完成,剩余 {nums - idx - 1} 个用户")
|
||||||
if len(failed_users) > 5:
|
if len(failed_users) > 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user