Giter Site home page Giter Site logo

Comments (16)

Dawnnnnnn avatar Dawnnnnnn commented on May 24, 2024 1

抽奖检测那里我留了坑了,time list 还在那放着呢,送过期礼物这个如果只考虑每天送的那些,还是很简单的。

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

收到 可以考虑

from bilibili-live-tools.

xuetaolu avatar xuetaolu commented on May 24, 2024

{bag_id: 55172243, gift_id: 3, gift_name: "B坷垃", gift_num: 9, gift_type: 0, expire_at: 0}

礼物包裹 bag_list 中存在 expire_at 为 0 的礼物,是永久的礼物,判断今天到期的礼物应为:

expire > 0 and expire < 86400

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

但是今天过期不一定马上要送,也可以在失效之前60s送,但是这样可能要麻烦一点,因为目前只是在登陆时检查一次礼物

from bilibili-live-tools.

Dawnnnnnn avatar Dawnnnnnn commented on May 24, 2024

这个我来做吧,我想想放到哪

from bilibili-live-tools.

xuetaolu avatar xuetaolu commented on May 24, 2024

半天检测一次,个人认为当天过期的礼物确实没必要留,

多加一个 task 运行周期为 3600 * 12 sec,

也可以由用户配置 周期 、 剩余时间临界值 、 赠送房间。

from bilibili-live-tools.

Dawnnnnnn avatar Dawnnnnnn commented on May 24, 2024

自动赠送礼物的话还要考虑亲密度上限啊.....很麻烦

from bilibili-live-tools.

xuetaolu avatar xuetaolu commented on May 24, 2024

暂时不用考虑亲密度上限,

主要针对 每日签到、每日粉丝勋章 的辣条、亿元(当天有效),最多增加 50 亲密度,

至于活动抽奖、小电视抽奖 的礼物包 (部分 > 1000 個) ,用户应有足够时间自行安排的

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

这个倒不是问题
要是可以实现,失效之前1s自动送的话,那么我们的抽奖检测也可以这么做了

from bilibili-live-tools.

xuetaolu avatar xuetaolu commented on May 24, 2024

这样就足够了,一般用户更关心 抽到多少礼物,不要浪费礼物 ,

至于勋章由于B坷垃不能用银瓜子送很多用户根本就没有勋章

from bilibili-live-tools.

Dawnnnnnn avatar Dawnnnnnn commented on May 24, 2024

我尽量今天完成

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

你不回又要轮询了吧……

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

只送当天的没意义吧……剩余一天就送……

from bilibili-live-tools.

xuetaolu avatar xuetaolu commented on May 24, 2024

刚发现赠送包裹礼物参数 csrf_token 的含义
与 cookie 中 bili_jct 值一致

URL: http://api.live.bilibili.com/gift/v2/live/bag_send
Method: POST

Form Data:

uid:4726457           /* 赠送用户uid */
gift_id:1             /* 礼物id 1为辣条 */
ruid:28673629         /* 接收用户uid */
gift_num:2            /* 礼物数量 */
bag_id:67637286       /* 来源礼物包id */
platform:pc           /* 平台 */
biz_code:live         /*  */
biz_id:25886          /* 直播间号 */
rnd:1522516325        /* 当前时间戳 */
storm_beat_id:0       /* 连击数 默认 0 */
metadata:             /* 默认空 */
price:0               /* 默认为 0 ,免费的 */
csrf_token:fce9ff23db2a8da348172da7e8972020
                      /* 与 cookie 中 bili_jct 值一致 */

from bilibili-live-tools.

yjqiang avatar yjqiang commented on May 24, 2024

感谢

from bilibili-live-tools.

ppleonardo avatar ppleonardo commented on May 24, 2024

谢谢这个问题的提出者,同时感谢各位大佬的详细解答。

from bilibili-live-tools.

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.