saermart / DouyinLiveWebFetcher

抖音直播间网页版的弹幕数据抓取(2024最新版本)
GNU Affero General Public License v3.0
526 stars 158 forks source link

关于signature参数的阶段性更新 #50

Open saermart opened 1 month ago

saermart commented 1 month ago

webmssdk.es5.js 是包含signature加密方法 frontierSign 的主要script,在NodeJs中运行需要补齐浏览器运行环境,基本就是缺啥补啥,在调试 signature 参数的过程中发现frontierSign 主要入口是 _0x5c2014 ,可以全局导出该函数并直接调用,在 issue#45 中有兄弟提供了一个链接,提到需要注意的是:在浏览器中 _0x6caf['envcode'] 的值是 1 ,在node中是129,所以也需要补进去。

使用PyExecJS运行 脚本sign.js ,正常: image

FHawk007 commented 1 month ago

我刚down了最新的代码,报了这个错,是什么原因呢? QQ截图20240717115656

saermart commented 1 month ago

我刚down了最新的代码,报了这个错,是什么原因呢? QQ截图20240717115656

看 liveMan.py 文件中的 generateSignature 函数的注释

saermart commented 1 month ago

nodejs 版本要保持 v18.x.x 一致

baggiowangyu commented 1 month ago

node 必须是v18.x.x吗?高版本应该也可以吧?

saermart commented 1 month ago

我这个测试的都是 v18,高版本几个都不行

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年07月17日 14:43 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [saermart/DouyinLiveWebFetcher] 关于signature参数的阶段性更新 (Issue #50) |

node 必须是v18.x.x吗?高版本应该也可以吧?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

baggiowangyu commented 1 month ago

我这个测试的都是 v18,高版本几个都不行 ---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年07月17日 14:43 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [saermart/DouyinLiveWebFetcher] 关于signature参数的阶段性更新 (Issue #50) | node 必须是v18.x.x吗?高版本应该也可以吧? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

你用v18.x.x测试的时候没有出现gbk编码的问题吧?没出现的话我降node版本试试看

SoYoungxSoWhat commented 1 month ago

我这个测试的都是 v18,高版本几个都不行 ---- 回复的原邮件 ---- | 发件人 | @.**> | | 日期 | 2024年07月17日 14:43 | | 收件人 | @.**> | | 抄送至 | @.>@.> | | 主题 | Re: [saermart/DouyinLiveWebFetcher] 关于signature参数的阶段性更新 (Issue #50) | node 必须是v18.x.x吗?高版本应该也可以吧? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

你用v18.x.x测试的时候没有出现gbk编码的问题吧?没出现的话我降node版本试试看

gbk和node版本没关系啊我测试过,看下作者注释, """ 出现gbk编码问题则修改 python模块subprocess的Popen类的init函数参数encoding值为 "utf-8" """

baggiowangyu commented 1 month ago

我这个测试的都是 v18,高版本几个都不行 ---- 回复的原邮件 ---- | 发件人 | @.**> | | 日期 | 2024年07月17日 14:43 | | 收件人 | @.**> | | 抄送至 | @.>@.> | | 主题 | Re: [saermart/DouyinLiveWebFetcher] 关于signature参数的阶段性更新 (Issue #50) | node 必须是v18.x.x吗?高版本应该也可以吧? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

你用v18.x.x测试的时候没有出现gbk编码的问题吧?没出现的话我降node版本试试看

gbk和node版本没关系啊我测试过,看下作者注释, """ 出现gbk编码问题则修改 python模块subprocess的Popen类的init函数参数encoding值为 "utf-8" """

如你所言,确实跟node版本无关。我还是改了subprocess的编码,现在可以了。

FHawk007 commented 1 month ago

我今天测试了几个直播间,发现了个问题。就是进入直播间的这个消息,跟在pc浏览器看到弹出来的不一样,有的时候控制台显示的比弹的多,有的时候弹出来的人在控制台没有显示。这个是什么原因

saermart commented 1 month ago

网页进去的时候弹幕有延时应该

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2024年07月17日 18:35 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [saermart/DouyinLiveWebFetcher] 关于signature参数的阶段性更新 (Issue #50) |

我今天测试了几个直播间,发现了个问题。就是进入直播间的这个消息,跟在pc浏览器看到弹出来的不一样,有的时候控制台显示的比弹的多,有的时候弹出来的人在控制台没有显示。这个是什么原因

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>