Code Monkey home page Code Monkey logo

Comments (57)

lkeme avatar lkeme commented on August 20, 2024

@suohun 可以,我下次会加上去,如果你现在需要的话,可以尝试自己修改

文件位置 includes/Traits/socketHelper.php

        //检查状态,返回真实roomid
        //$this->_roomRealId = $this->getUserRecommend();
        //$this->_roomRealId = $this->_roomRealId ?: $this->liveRoomStatus($this->_defaultRoomId);
        $this->_roomRealId = 你要指定的房间号;

改成我发这样就好了

from bilihelper.

suohun avatar suohun commented on August 20, 2024

好的我试试,非常感谢

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 已经添加功能了,可以修改index.php里面的配置项了

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

辛苦

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 大佬,请教个其他问题,不能输出抽奖日志文件是什么问题(record文件夹),找不到路径,然后我就把活动和小电视文件里的路径 $path = '.record/' 改成 $path = 'D:/bilibili/record/' 就可以。这个是我电脑php哪里设置问题吗

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 你修改过默认的吗
默认应该是这样的 $path = './record/
你发的是这样的 $path = '.record/'

如果这只是你打错了,那应该是文件夹的一些权限问题

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 嗯,打错了。就是开始用默认的就会弹错,找不到文件。我就直接改了具体路径。也不太懂,前天刚装的php,折腾一下午才会运行..

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

可以试着先手动创建record文件夹(我瞎猜的)
(一下午就上手了,膜

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 那应该就是权限问题了,

  • 你可以尝试给文件夹一些权限
  • 尝试用有管理员权限的终端(cmd)
  • 也可以如上面所说,删除文件夹,然后手动创建一次文件夹

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@tangmingshuai 见笑了,全靠百度,照着教程傻瓜式安装,也不懂代码233

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 嗯嗯,文件夹有给过权限,不行。我再试试你说的第2和第3种方法。麻烦了,非常感谢~

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 我都在linux上跑的,win上也跑过,没出现过这个权限问题

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

借楼..我之前提的仅某个直播间弹幕发送失败的问题,原因是被房管禁言了2333

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@tangmingshuai 2333 可以 这就不是我的锅了

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 重新写了文件写入,你可以试试还有么有权限问题,有时间的话测试一下

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 辛苦了,迟些试试。另外我前天刚开始不懂用网页运行的时候是可以写入的,后来用cmd就不行(win10)

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 这是终端执行的,网页估计会出问题,(我也没试过),我的机器也是win10,我测试肯定是没问题的

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 网页加载会卡,然后运行一直刷消息,估计到最后会卡死,不敢再试。但是是可以领到礼物的233

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 我能猜到一点,会卡很正常,消息很多,不能及时输出刷新,因为本身加了无限超时,能领礼物也算是正常的,毕竟都执行成功了,不过我推荐还是终端执行

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 嗯,很好用。目前的话就发现有时候会重新加载弹幕服务器,早些的时候换了好几个房间,不知道是不是B站服务器那边的问题

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 有一部分是,有一部分不是,如果你换一个人气比较可以的,有陆陆续续的弹幕的房间是最好的,重连服务器就会少很多,不过换服务器也没大碍,只会错过5s的时间而且,连接的房间都是随机的

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

想问一下,用作登录验证码识别的那个接口[http://ocr.shouji.sogou.com/v2/ocr/json]有什么使用限制么,我在网页中打开尝试识别后直接跳转到[http://pic.sogou.com/]了

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@tangmingshuai 没什么限制,只是一个上传图片的接口而已,
你是怎么直接用浏览器打开的,我没用网页打开过,我也不清楚这个,

另外这个ocr识别验证码的效率还是比较低的,识别文字这些东西还可以

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

image
嗯嗯,了解了,chrome浏览器貌似可以直接打开

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 我测试了,文件写入不是权限问题,是终端必须得在文件当前文件夹运行才行,得cd到目标文件夹下打开...(原来的版本也是可以正常创建写入的,抱歉添麻烦了)

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 自定义弹幕房间好像有点问题

1.读取推送流出错一直重连
qq 20180318151239

2.如果输入短号房间,会报错
qq 20180318142941

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

嗯,不在直播,直播间存在跳转时会报错

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 抱歉,已修复,如果可以,你可以测试一下反馈我

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@tangmingshuai 不在直播也是可以的,只是一定要是有效的房间,
另外,你说的存在跳转是什么意思

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 大佬更新好快,辛苦了。功能已经正常。
我也试了一下默认,以前的好像是进入人气直播间,而且重连的话是会随机换房间;现在的是进入随机房间,然后重连的话还是一直连的同个房间?

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 都是随机的,我并没有固定,重连也是随机的

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 默认情况下的,随机进入768502房间后,重连会一直连的这个房间,之前是会换房间(不过都不影响抽奖,好像也没关系2333)
qq 20180318164028

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 不应该会重复的,运气来了也就重复一两次,写的900个房间里随机,你是不是固定房间号的

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 试的默认的,是有些奇怪

from bilihelper.

Franinc avatar Franinc commented on August 20, 2024

感谢更新 简单测试了下,双端活动抽奖能正常获得3辣条
我这边测试的半小时里重连也一直是同一个房间,项目是全新下载,没指定过房间号
另外没有抽奖的话,大概每70s左右会重连一次弹幕服务器,不知道会不会在重连时漏抽,除此之外还有几次别的报错
snipaste_2018-03-18_17-21-48

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 不是你的问题,是我粗心了,已经修复了,抱歉

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@Franinc 重复的房间的问题已经修复了,另外,我一直没碰到过这个报错,是一直连续的报错吗

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 谢谢,辛苦了

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@Franinc 是什么环境,什么php版本,是终端执行的吗?我看能不能尝试复现

from bilihelper.

Franinc avatar Franinc commented on August 20, 2024

不是连续的,半小时里出现过三次,时间无规律
我一会更新下试试小房间号
环境:r6900路由+merlin+entware,php和扩展版本如下:
php7 - 7.2.2-1
php7-cgi - 7.2.2-1
php7-fastcgi - 7.2.2-1
php7-fpm - 7.2.2-1
php7-mod-curl - 7.2.2-1
php7-mod-gd - 7.2.2-1
php7-mod-json - 7.2.2-1
php7-mod-openssl - 7.2.2-1
php7-mod-sockets - 7.2.2-1
php7-mod-xml - 7.2.2-1

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@Franinc 你用终端执行的吗 (php index.php)这样?怎么会出现html的换行符?

from bilihelper.

Franinc avatar Franinc commented on August 20, 2024

entware的opkg包管理不提供php命令,只有php-cgi,php-fcgi(fastcgi),php-cli几条

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@Franinc 就php-cli index.php

from bilihelper.

Franinc avatar Franinc commented on August 20, 2024

ok我更新后继续测试看还有没有报错

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 请教个问题, [SOCKET] 读取推送流错误重连问题,只要1分钟左右没弹幕消息就会重连,然后这个时间点是会漏掉抽奖的。不知道有没有比较好的解决方法。
我想着借用房间自动发弹幕的功能,设置30S发一次弹幕,然后去连接这个房间。但是没有效果。情况是刚运行的时候会发一次弹幕,然后如果房间里没有[SOCKET] 消息,是不会自动发送弹幕,然后1分钟后又重连弹幕房间,然后才会自动发一次。

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 先说说原因,因为这个程序理论来说至少需要2个线程的,
一个负责发送心跳,一个负责接收数据,但是php的多线程实现起来比较麻烦
,一直单线程操作,如果没有弹幕,读取消息的时候就会一直等待,
造成了阻塞,心跳正常是需要30s发送一次,没有心跳的话服务端就会断开,就需要重连....
大概就是阻塞了,导致心跳没发送出去...emmmm

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun
ps: 就算重连也只会断掉5s(我是怕太频繁会异常,也可以改成他1s,或者0s)的空隙,我个人觉得问题不是很大,如过要说解决方案的话,

有三个

  • 找一个比较稳定直播间(满足2个因素,比较稳定的弹幕,1-30s之内有弹幕,尽量不会出现辣条刷屏,节奏风暴等)
  • 单独挂一个脚本(能在一个直播间定时发弹幕,保持活跃)
  • 换个支持多线程的语言(重写= =)
  • 待添加

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme emm,了解了,谢谢细心讲解。第一个挺难满足的,没有这么稳定的房,随机因素多。第二个我去试试哈。

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 嗯,会不会太麻烦了

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

哇,官方小课堂

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

pthread是不是能够解决问题(

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun pthread虽然有可能实现功能,但是需要另行安装,或者编译,这就是我说的麻烦,不可能让每个使用者都去弄一次吧

from bilihelper.

T-Evan avatar T-Evan commented on August 20, 2024

嗦嘎,了解了

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 写好了 欢迎测试 我只有2个号 不能完全测试出效果

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 辛苦了,测试了一下,可以正常使用,还没重连过,等晚些礼物少的时候再试试稳定。

from bilihelper.

lkeme avatar lkeme commented on August 20, 2024

@suohun 你有空的话帮我测试下最近提交的,我代码好像回退错了版本,不知道改了啥,试试有么有问题

from bilihelper.

suohun avatar suohun commented on August 20, 2024

@lkeme 好的

from bilihelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.