Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题&建议] 有关dynamic.get_live_users报错和一点建议 #886

Open
GEYUANwuqi opened this issue Feb 4, 2025 · 2 comments
Open

Comments

@GEYUANwuqi
Copy link

async def test(): uid = Credential(sessdata="114514aabbccdd") live = await dynamic.get_live_users(credential=uid) print(live) while True: sync(test()) sleep(10)

这样的代码里,会有报错

Traceback (most recent call last): File "d:\yuan\Desktop\yue_bot\test.py", line 27, in <module> sync(test()) File "D:\Miniconda\Lib\site-packages\bilibili_api\utils\sync.py", line 33, in sync return loop.run_until_complete(coroutine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Miniconda\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "d:\yuan\Desktop\yue_bot\test.py", line 23, in test live = await dynamic.get_live_users(credential=uid) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Miniconda\Lib\site-packages\bilibili_api\dynamic.py", line 874, in get_live_users return await Api(**api, credential=credential).update_params(**params).result ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Miniconda\Lib\site-packages\bilibili_api\utils\network.py", line 170, in result self.__result = await self.request() ^^^^^^^^^^^^^^^^^^^^ File "D:\Miniconda\Lib\site-packages\bilibili_api\utils\network.py", line 70, in inner return await func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Miniconda\Lib\site-packages\bilibili_api\utils\network.py", line 332, in request raise ResponseCodeException(code, msg, resp_data) bilibili_api.exceptions.ResponseCodeException.ResponseCodeException: 接口返回错误代码:4100000,信息:4100000。 {'code': 4100000, 'message': '4100000', 'ttl': 1

本意其实只是获取某个人是不是在直播

能不能写一个模块,get到某个用户的直播间的连接状况(return 0(未开通直播间) 1(下播) 2(开播) 3(录播))这样的东西

@GEYUANwuqi
Copy link
Author

另,用的是dev分支,因为稳定版本也有(#882 )的问题,pip直接就安装不了

@Nemo2011
Copy link
Owner

Nemo2011 commented Feb 4, 2025

接口有变动 数据在 dynamic.get_dynamic_page_UPs_info 接口返回数据中

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants