f2 icon indicating copy to clipboard operation
f2 copied to clipboard

[QUESTION] 直播间聊天弹幕抓取

Open CCMonkeyss opened this issue 6 months ago • 1 comments

  • [ ] ~~在提问时请注意不要包含个人敏感信息~~
  • [ ] 我明白我的提问可能不会得到明确回复或解决。

问题描述

你好,我想抓取并记录直播间的弹幕内容, 使用接口列表“直播间wss负载数据 🟢”的代码, 并且在"cookie": "YOUR_COOKIE_HERE",里填入了passport_csrf_token、msToken、ttwid、sessionid_ss, 运行后出现以下错误信息。 (我发现运行后原本在直播间的账号会被顶下线)

电脑是m1的mac。

INFO 开始查询用户信息
INFO 用户信息查询结束
INFO 开始爬取直播: 81149841696 的数据
INFO 直播信息爬取结束
INFO 开始查询直播间信息
INFO 直播间信息查询结束
Traceback (most recent call last): File "/Users/jun/Desktop/123.py", line 54, in asyncio.run(main()) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() File "/Users/jun/Desktop/123.py", line 45, in main await DouyinHandler(kwargs2).fetch_live_danmaku( File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/f2/apps/douyin/handler.py", line 1669, in fetch_live_danmaku ).get_signature(room_id, user_unique_id) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/f2/apps/douyin/algorithm/webcast_signature.py", line 51, in get_signature result = ctx.call("get_signature", x_ms_stub) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_abstract_runtime_context.py", line 37, in call return self._call(name, *args) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_external_runtime.py", line 92, in _call return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args)) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_external_runtime.py", line 78, in eval return self.exec(code) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/abstract_runtime_context.py", line 18, in exec return self.exec(source) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_external_runtime.py", line 85, in exec output = self._exec_with_tempfile(source) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_external_runtime.py", line 127, in _exec_with_tempfile self._fail_on_non_zero_status(ret, stdoutdata, stderrdata) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/execjs/_external_runtime.py", line 134, in _fail_on_non_zero_status raise ProcessExitedWithNonZeroStatus(status=status, stdout=stdoutdata, stderr=stderrdata) execjs._exceptions.ProcessExitedWithNonZeroStatus: (1, '', 'The operation couldn’t be completed. Unable to locate a Java Runtime.\nPlease visit http://www.java.com for information on installing Java.\n\n')

其他细节 提供任何相关的细节或背景信息,例如你要询问的函数或与项目相关的具体内容。

截图/代码示例 如果有必要,可以提供截图或代码示例以更好地说明问题或询问的内容。

期望的支持 我不懂编程,正在学习,不知道是哪里操作有误,希望能得到一些解决问题的思路,再去查相关资料, 谢谢🙏

其他 如果有其他需要补充的内容,请在此处添加。

CCMonkeyss avatar Jul 28 '24 04:07 CCMonkeyss