Closed FinBird closed 1 year ago
代码:
import aiotieba as tb import asyncio async def ban(): async with tb.Client('default') as brow: brow.account.BDUSS = '*****' black_list = ('_G***Uty', '_5***CyQ', '_7***1NE', '_5***t8t8y') for id_ in black_list: await brow.block('*', id_, day=10, reason='') asyncio.run(ban())
输出结果:
<2023-09-17 19:31:30.416> [WARN] [_get_uinfo_user_json] Empty body. user_name=_G***Uty <2023-09-17 19:31:30.596> [WARN] [block] (300000, '由于系统升级,烦请您更新至最新版客户端处理违规用户,感谢您的理解与支持!'). fid=17636** portrait= day=10 <2023-09-17 19:31:30.634> [WARN] [_get_uinfo_user_json] Empty body. user_name=_5***CyQ <2023-09-17 19:31:30.720> [WARN] [block] (300000, '由于系统升级,烦请您更新至最新版客户端处理违规用户,感谢您的理解与支持!'). fid=17636** portrait= day=10 <2023-09-17 19:31:30.750> [WARN] [_get_uinfo_user_json] Empty body. user_name=_7***1NE <2023-09-17 19:31:31.420> [WARN] [block] (300000, '由于系统升级,烦请您更新至最新版客户端处理违规用户,感谢您的理解与支持!'). fid=17636** portrait= day=10 <2023-09-17 19:31:31.476> [WARN] [_get_uinfo_user_json] Empty body. user_name=_5***t8t8y <2023-09-17 19:31:31.512> [WARN] [block] (300000, '由于系统升级,烦请您更新至最新版客户端处理违规用户,感谢您的理解与支持!'). fid=17636** portrait= day=10
你是用的用户名?我这封禁没有问题
好像明白原因了,我用的是nick_name字段做参数。现在似乎只能用potrait username user_id。
nick_name
potrait
username
user_id
代码:
输出结果: