bilive / bilive_client Goto Github PK
View Code? Open in Web Editor NEW基于Node.JS的bilibili账号活跃系统
License: MIT License
基于Node.JS的bilibili账号活跃系统
License: MIT License
作者你的挂机很好用,我想问下你有群么?很多人想反应或者提交意见都无处可寻~
看了看你的代码 发现你是用https://passport.bilibili.com/api/login/sso 这个获取Cookie
不过我试了试好像获取不到Cookie?
今天上线的新活动,实测发现B站对dataJson.giftId
的返回值进行了修改
我将listener.js:47中的if (dataJson.giftId === 103)
修改为if (dataJson.giftId === 106)
后可以正常抽火力票,大大可以更新一波
嘛,破站就知道瞎改ㄟ( ▔, ▔ )ㄏ
刚用的几天能正常抽辣条 但后来就只是提示某某房间赠送小电视 但没有中了什么的提示
确定设置那里是true的
npm install后显示错误
npm WARN [email protected] No repository field
前几个账号还好,正常更新,后面的就出现
Nov 18 2017 18:24:06 : shenjingzhi Token更新失败 { ts: 1511000666, message: 'CAPTCHA is not match', code: -105 }
我看账号和账号之间的更新时间几乎没有延时,也许每个账号更新增加点时间间隔比较好吧?
控制台信息:
Jan 28 2018 20:59:27 : 尝试重连弹幕服务器失败,五分钟后再次重新连接
Jan 28 2018 21:02:30 : http://api.live.bilibili.com/YunYing/roomEvent?event_type=newspring-4539&room_id=939654&access_key=45f10954ee61e618be0652bd9d37fa16&actionKey=appkey&appkey=1d8b6e7d45233436&build=521200&mobi_app=android&platform=android&ts=1517144069&sign=eb6c0e0e5e28ec9e2fef2a2cc1c89240 { Error: read ECONNABORTED
at _errnoException (util.js:1024:11)
at TCP.onread (net.js:615:25) code: 'ECONNABORTED', errno: 'ECONNABORTED', syscall: 'read' }
Jan 28 2018 21:02:30 : http://api.live.bilibili.com/User/userOnlineHeart { Error: read ECONNABORTED
at _errnoException (util.js:1024:11)
at TCP.onread (net.js:615:25) code: 'ECONNABORTED', errno: 'ECONNABORTED', syscall: 'read' }
events.js:183
throw er; // Unhandled 'error' event
^
Error: connect ENETUNREACH 101.200.58.11:80 - Local (0.0.0.0:0)
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at internalConnect (net.js:971:16)
at emitLookup (net.js:1106:7)
at options.lookup (/data/data/com.termux/files/home/bilive_client/bilive/lib/tools.js:50:24)
at lookupAndConnect (net.js:1087:3)
at Socket.connect (net.js:1028:5)
at Object.connect (net.js:103:35)
at Agent.IP.httpAgent.createConnection (/data/data/com.termux/files/home/bilive_client/bilive/lib/tools.js:52:24)
at Agent.createSocket (_http_agent.js:237:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
请问节奏风暴现在是处于关闭状态吗。。。还有这个服务器能够自定义么
怎么解决,求教
如题,在各位巨佬各显神通的情况下,我发现如果直播间的抽奖高能是被“嗨翻全场”道具触发,挂机系统就不会触发抽奖;225x哔哩星的就没问题
我怀疑是giftID
返值不同的原因,尝试过翻看数据,但我找不到有关于giftID
的信息,希望作者大佬可以注意一下,或者给介绍下是哪个GET/POST资源的返值呢?
想在没到过期前,手动给主播送礼
C:\Users\Administrator\Downloads\bilive_client>node app.js
undefined:19
"status": True,
^
SyntaxError: Unexpected token T in JSON at position 354
at JSON.parse ()
at fs.readFile (C:\Users\Administrator\Downloads\bilive_client\bilive\lib\tools.js:41:39)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:505:3)
Dec 08 2017 01:00:55 : 1 应援团签到 获取应援团列表失败 { code: 0, msg: '', message: '', data: { list: [] } }
Dec 08 2017 01:00:55 : 3 日常活动 签名校验错误
Dec 08 2017 01:00:55 : 2 日常活动 签名校验错误
Dec 08 2017 01:00:55 : 3 每日签到 已签到
Dec 08 2017 01:00:55 : 2 应援团签到 获取应援团列表失败 { code: 0, msg: '', message: '', data: { list: [] } }
是什么情况?
解决办法就是将旧版1.0.0里的package.json复制到新版下即可解决
现在只有网页抽奖获得1个辣条 手机端的X1辣条没了 是什么原因?
版本1.3.1
请问文件配置在哪里配置?
是需要我将个人信息都配置在options.default.json?
另外,
地址:https://lzghzr.github.io/bilive_client_view/index.html
这里面配置的是什么?是不是有个服务器端的部署?
其他小问题, 认为几句话就可以说清的在下面反馈即可
觉得问题很复杂而上面也没有解决方法的, 欢迎提issue, 我也可以为上面的内容做补充
没事儿了
大佬您好,我在win系统下可以正常使用您的程序,现在想在树莓派上运行,可以更加低耗稳定,不知您有没有相关教程,我始终无法成功,谢谢您!
第一期 #39
/**
* 赠送礼物
*
* @private
* @param {string} uid
* @memberof Online
*/
private async _SendGift(uid: string) {
let userData = _options.user[uid],
roomID = _options.config.giftRoomID,
//获取房间信息(ruid)
getRoomInfo = {
uri: `${apiLiveOrigin}/room/v1/Room/room_init?id=${roomID}`,
jar: cookieJar[uid],
json: true,
headers: {
'Referer': `https://live.bilibili.com/${roomID}`
}
}, roomInfoResponse = await tools.XHR(getRoomInfo)
.catch((reject) => { tools.Error(userData.nickname, reject); })
if (roomInfoResponse != null && roomInfoResponse.body.code === 0) {
let ruid = roomInfoResponse.body.data.uid,
//获取礼物信息
getGiftInfo = {
uri: `${apiLiveOrigin}/gift/v2/gift/bag_list`,
jar: cookieJar[uid],
json: true,
headers: {
'Referer': `https://live.bilibili.com/${roomID}`
}
}, giftInfoResponse = await tools.XHR(getGiftInfo)
.catch((reject) => { tools.Error(userData.nickname, reject); })
if (giftInfoResponse != null && giftInfoResponse.body.code === 0) {
let nowTime = giftInfoResponse.body.data.time,
giftInfos = giftInfoResponse.body.data.list
for(let listId in giftInfos) {
let giftInfo = giftInfos[listId]
//判断礼物过期时间,赠送当日过期的礼物
if ((giftInfo.expire_at-nowTime) / 3600 <= 24) {
let rnd = Math.floor(Date.now() / 1000 - 60 - 300 * Math.random()),
bili_jct = userData.cookie.match(new RegExp("(^| )bili_jct=([^;]*)(;|$)"))[2],
DedeUserID = userData.cookie.match(new RegExp("(^| )DedeUserID=([^;]*)(;|$)"))[2],
sendData = `uid=${DedeUserID}&gift_id=${giftInfo.gift_id}&ruid=${ruid}&gift_num=${giftInfo.gift_num}&bag_id=${giftInfo.bag_id}&platform=pc&biz_code=live&biz_id=${roomID}&rnd==${rnd}&storm_beat_id=0&metadata=&token=&csrf_token=${bili_jct}`,
sendGift = {
method: 'POST',
uri: `${apiLiveOrigin}/gift/v2/live/bag_send`,
body: sendData,
jar: cookieJar[uid],
json: true,
headers: {
'Content-Type': `application/x-form-urlencoded`
}
}, sendGiftResponse = await tools.XHR(sendGift)
.catch((reject) => { tools.Error(userData.nickname, reject); })
if (sendGiftResponse != null && sendGiftResponse.body.code === 0)
tools.Log(userData.nickname,`成功向 ${roomID} 赠送 ${giftInfo.gift_num} 个 ${giftInfo.gift_name}`)
}
}
}
}
}
module.js:457
throw err;
^
Error: Cannot find module '/root/node-v6.4.0/bilive_client/app.js'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
由/Online/userOnlineHeart
变更为/User/userOnlineHeart
这个是领取延迟决定的还是有别的方式可以领到?
查了相关知识 还是不懂怎么翻译 劳烦老哥
(node:688) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: First argument should be a valid curve name
(node:688) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
这是什么意思 ?
作者(`・ω・´)有沒有甚麼方法開機執行 node app.js ?
比如 做個執行檔 放到啟動資料夾
想知道这个bilive_client的这个地址和apikey是在哪获得的
原来大大教把options.js那行改成
this._http.listen(process.env.PORT, () => {
一直连接很好,现在版本options.js heroku报错
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: EROFS: read-only file system, mkdir '/app/bilive/lib/../../../options/'
at Object.fs.mkdirSync (fs.js:885:18)
at Options.Promise (/app/bilive/lib/tools.js:71:16)
at new Promise ()
at Object.Options (/app/bilive/lib/tools.js:68:12)
at BiLive.Start (/app/bilive/index.js:14:34)
at Object. (/app/app.js:4:8)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
然后
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
我很笨试着把以前能运行的options.js复制回去还是一样的提示
我本身能力有限,修改了多次无法成功,只能求助下大大了。
马飞难受!lzghzr牛逼!!!
小电视抽奖中奖喵娘以后显示不对。
我在vps上挂的程序,想在本地访问设置界面。可能是因为我运行了nginx和别的签到站什么的,在设置网页输入: wx://vps地址:10080 这样是连不上的,请问我如何可以(能不能)实现远程控制呢?
感谢作者大大。
这几天晚上实测当同一用户一次送多个小电视或丰收祭典时只能监听到第一个电视的消息,无法全部参与。
今天節奏風暴我拿到了45個億圓~
前幾天都完全拿不到 不知今天是怎麼了(`・ω・´)
网页设置连接后网页空白,看控制台访问127.0.0.1:10080一直是Pending,状态是101;
直接访问http://127.0.0.1:10080 是可以访问的;
nodejs版本是8.5,npm版本是5.3;
还有npm install
一直少装一个库,加上参数-g
才装上.
module.js:487
throw err;
^
Error: Cannot find module '/root/bilive_client/bilive/index'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/root/bilive_client/app.ts:1:78)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
@lzghzr 好的,收到回复了,谢谢大佬及时回复。
深感程序员真是辛苦,感谢您提供的项目造福小白苦手。鞠躬。
这个地址和其apikey是啥
昨晚晚些时候发现client的log只能监听小电视信息但不能参与抽奖,怀疑B站对参与方法进行了修改。于是使用浏览器f12查看,发现参与小电视抽奖的方法似乎换了。
现在的是http://api.live.bilibili.com/gift/v2/smalltv/join?roomid=$(RoomID)&id=$(raffleID)
而之前的是http://api.live.bilibili.com/SmallTV/join/roomid=${this._roomID}&id=${this._raffleId}&_=${Date.now()}
另外发现获取抽奖结果返回值的方法亦有修改,现在的是http://api.live.bilibili.com/gift/v2/smalltv/notice?roomid=$(RoomID)&raffleId=$(raffleID)
以上方法在我的chrome上测试通过,能够参与并获取小电视抽奖及其结果。然而我萌新,没办法完成对现行js脚本的修改= ̄ω ̄=希望大佬完成
BTW,貌似祭典活动也修改了?现在的进入好像是http://api.live.bilibili.com/activity/v1/Raffle/join?roomid=$(RoomID)&raffleId=$(raffleID)
跟之前的比对发现时间项${Date.now()}
貌似没用了2333
另外发现小电视礼物返回值格式也改了,向祭典礼物看齐,看来B站是要统一礼物格式了
以前任务完成礼物直接到账,现在要自己点领取键。
另外那个观看五分钟直播奖励也是这样的。
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at Server.listen (net.js:1496:7)
at Options._HttpServer (/home/wwwroot/bilive_client/bilive/options.js:28:20)
at Options.Start (/home/wwwroot/bilive_client/bilive/options.js:15:14)
at BiLive.Options (/home/wwwroot/bilive_client/bilive/index.js:29:18)
at BiLive.Start (/home/wwwroot/bilive_client/bilive/index.js:22:18)
at <anonymous>
errno: 'EADDRINUSE',
code: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 10080 }
昨天还行
node 9.2.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.