danmu icon indicating copy to clipboard operation
danmu copied to clipboard

DouYu Danmu issue

Open rickyi22 opened this issue 6 years ago • 2 comments

i find a problem that when using DanmuClient, some new douyu room url seems not wroking for the same version client, ex: 'https://www.douyu.com/65000' but some other douyu_url i crawled before is also useful, did someone has the same problem here ?

rickyi22 avatar Oct 12 '18 11:10 rickyi22

不好意思,大佬,用下中文,我用以前的斗鱼抓取脚本, 改一下房间名就没效果了, 但改为以前的房间名还是可以,不知道哪里出错了 新房间名:https://www.douyu.com/65000 旧房间名:http://www.douyu.com/569130

"dmc = DanMuClient('https://www.douyu.com/xxxxxx') @dmc.danmu def danmu_fn(msg): if msg: pp('[%s] %s' % (msg['NickName'], msg['Content'])) dmc.start(blockThread = True)"

rickyi22 avatar Oct 12 '18 11:10 rickyi22

在斗鱼里,爬取所用的api接口 其房间号是最开始创建的,不可更改。 当 主播发生 房间号变更时,实质上是产生了2个房间号,注销掉最开始的房间号,使用新的房间号。

如果在斗鱼中发现有直播间的id 无法正常获取消息,大概率是这个原因导致的。 这个逻辑只要作者再稍微补充一下即可。

Goldtype avatar Mar 26 '19 19:03 Goldtype