saermart / DouyinLiveWebFetcher

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

长时间去获取,终于被拉黑了,这种该如何去规避呢? #41

Closed hotdogarea closed 1 month ago

hotdogarea commented 2 months ago

WebSocket error: Handshake status 200 OK -+-+- {'server': 'Tengine', 'content-length': '0', 'connection': 'keep-alive', 'date': 'Thu, 20 Jun 2024 11:20:03 GMT', 'handshake-msg': 'DEVICE_BLOCKED', 'handshake-status': '415', 'server-timing': 'inner; dur=83', 'x-tt-trace-host': '01fdc36f8a940d17f868057b0a967d4625fe855bea22c6de623ad77d9a68c3c79b9e93c17211f50599c1d411b2acaaca743c3091e388bb93a975e4624c52c43ba66e00d49cdb0cb0d1bc001dda0e93cccdec03dcdb6ccbb0ff2b522572cedbb46f', 'x-tt-trace-tag': 'id=03;cdn-cache=miss;type=dyn', 'x-tt-trace-id': '00-240620192003A11B6919904367DA19FA-26267C3448A6C175-00', 'x-tt-logid': '20240620192003A11B6919904367DA19FA', 'via': 'vcache16.cn5907[204,0]', 'timing-allow-origin': '*', 'eagleid': '717de42417188824036548184e'} -+-+- b''

saermart commented 2 months ago

添加代理即可

hotdogarea commented 2 months ago

佬,我有两部分逻辑 一侧是通过selenium➕无头浏览器去获取弹幕,这里去加代理倒是清楚。另一侧我是直接将作者代码加入到了业务逻辑里,业务逻辑中该如何添加代理。或者是直接在作者代码中发起ws链接时就添加代理吗? 

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: Y @.> 发送时间: 2024年6月20日 19:51 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41)

添加代理即可

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

saermart commented 2 months ago

在建立连接时添加代理

yuanchangchun commented 2 months ago

应该是晚上这种方式被风控了,换了几个IP都不行

OneMobPsycho100 commented 2 months ago

我也不行,应该是改了请求头吧

hotdogarea commented 2 months ago

我是今天下午大概六点后出现的

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:06 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41)

我也不行,应该是改了请求头吧

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

OneMobPsycho100 commented 2 months ago

是的,我也是同样的时间。 换了三台机器,这个代码都跑不了了

hotdogarea commented 2 months ago

错误代码跟我这个一样吗,我是挂了七十个小时,出现device_blocked,ws链接还是正常的,我等下试试链接的时候加代理看看,

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:12 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41)

是的,我也是同样的时间。 换了三台机器,这个代码都跑不了了

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

OneMobPsycho100 commented 2 months ago

错误代码跟我这个一样吗,我是挂了七十个小时,出现device_blocked,ws链接还是正常的,我等下试试链接的时候加代理看看, 发自我的iPhone ------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:12 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41) 是的,我也是同样的时间。 换了三台机器,这个代码都跑不了了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

一样的,我一天才挂6个小时不到,还会关。 我试了一下直接粘贴浏览器的参数可以跑,估计加了什么签名验证

hotdogarea commented 2 months ago

直接开浏览器挂代理是可以跑的是吧

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:25 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41)

错误代码跟我这个一样吗,我是挂了七十个小时,出现device_blocked,ws链接还是正常的,我等下试试链接的时候加代理看看, 发自我的iPhone … ------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:12 收件人: saermart/DouyinLiveWebFetcher @.> 抄送: hotdogarea @.>, Author @.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41) 是的,我也是同样的时间。 换了三台机器,这个代码都跑不了了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

一样的,我一天才挂6个小时不到,还会关。 我试了一下直接粘贴浏览器的参数可以跑,估计加了什么签名验证

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

LyzenX commented 2 months ago

看起来应该是要signature了,我用浏览器抓的一个wss链接试了一下,可以跑,但把signature改成00000000就会报200

saermart commented 2 months ago

代码跑不了了,后面有时间再调试看看[逃]

hotdogarea commented 2 months ago

错误代码跟我这个一样吗,我是挂了七十个小时,出现deviceblocked,ws链接还是正常的,我等下试试链接的时候加代理看看, 发自我的iPhone ------------------ 原始邮件 ------------------ 发件人: MZ Chen @.> 发送时间: 2024年6月20日 21:12 收件人: saermart/DouyinLiveWebFetcher _@_.> 抄送: hotdogarea @.>, Author _@_.> 主题: 回复:[saermart/DouyinLiveWebFetcher] 长时间去获取,终于被拉黑了,这种该如何去规避呢? (Issue #41) 是的,我也是同样的时间。 换了三台机器,这个代码都跑不了了 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @_.***>

一样的,我一天才挂6个小时不到,还会关。 我试了一下直接粘贴浏览器的参数可以跑,估计加了什么签名验证

是的 就是签名的问题

hotdogarea commented 2 months ago

代码跑不了了,后面有时间再调试看看[逃]

辛苦! 佬

junjunya2020 commented 2 months ago

代码跑不了了,后面有时间再调试看看[逃] 辛苦了!!!

yefeng2renxing commented 2 months ago

是因为抖音更新了,现在需要逆向signature的值,错误的值会被返回200

stefaniework commented 2 months ago

是因为抖音更新了,现在需要逆向signature的值,错误的值会被返回200

大佬有没有好办法,好像有的软件还是可以的。。。

zlpu commented 2 months ago

参考这个项目,应该能做出来 https://github.com/biliup/biliup/blob/master/biliup/Danmaku/douyin.py

saermart commented 1 month ago

已更新