Giter Site home page Giter Site logo

bilibili-live-tools's Issues

关于平台兼容问题

yjqiang#4
这里面的rgb显示方式不同平台支持不一样,比如我用的ios pythonista是console.set_color(),但是其他的平台是print(“0m”)(类似的,忘记了。。。),但是ios平台可以随意设置rgb,而其余平台只能指定有限10个颜色左右。
怎么处理不同平台问题?

登录提示

添加登陆提示功能
包括密码错误、验证码等
#37

Fatal Python error: Cannot recover from stack overflow

两三个小时后崩溃了……日志:

[2018-05-28 20:41:47] 心跳
[2018-05-28 20:42:38] 房间  96136  小电视道具抽奖结果: 辣条X2
[2018-05-28 20:43:38] 房间4256665下播!将切换监听房间
Fatal Python error: Cannot recover from stack overflow.

Thread 0x464b7470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x45c96470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x4548d470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x44c1e470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x44363470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x43b63470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x432ff470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x428ff470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x41eff470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Thread 0x41567470 (most recent call first):
  File "/threading.py", line 295 in wait
  File "/queue.py", line 164 in get
  File "/thread.py", line 67 in _worker
  File "/threading.py", line 864 in run
  File "/threading.py", line 916 in _bootstrap_inner
  File "/threading.py", line 884 in _bootstrap

Current thread 0x40031000 (most recent call first):
  File "/threading.py", line 226 in __init__
  File "/queue.py", line 39 in __init__
  File "/opt/lib/python3.6/site-packages/urllib3/connectionpool.py", line 181 in __init__
  File "/opt/lib/python3.6/site-packages/urllib3/connectionpool.py", line 769 in __init__
  File "/opt/lib/python3.6/site-packages/urllib3/poolmanager.py", line 195 in _new_pool
  File "/opt/lib/python3.6/site-packages/urllib3/poolmanager.py", line 261 in connection_from_pool_key
  File "/opt/lib/python3.6/site-packages/urllib3/poolmanager.py", line 240 in connection_from_context
  File "/opt/lib/python3.6/site-packages/urllib3/poolmanager.py", line 227 in connection_from_host
  File "/opt/lib/python3.6/site-packages/urllib3/poolmanager.py", line 279 in connection_from_url
  File "/opt/lib/python3.6/site-packages/requests/adapters.py", line 309 in get_connection
  File "/opt/lib/python3.6/site-packages/requests/adapters.py", line 405 in send
  File "/opt/lib/python3.6/site-packages/requests/sessions.py", line 618 in send
  File "/opt/lib/python3.6/site-packages/requests/sessions.py", line 508 in request
  File "/opt/lib/python3.6/site-packages/requests/api.py", line 58 in request
  File "/opt/lib/python3.6/site-packages/requests/api.py", line 72 in get
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 14 in game_area
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 36 in get_all
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 41 in get_all
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 41 in get_all
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 41 in get_all
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 41 in get_all
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/MultiRoom.py", line 41 in get_all

问题,重新开一个lssuse

添加后错误代码又变了
Traceback (most recent call last):
File "C:\Users\Dee丶\Desktop\bilibili-live-tools-master\login.py", line 42, in success
response = requests.post(url, data=payload, headers=headersprint(response.json()))
NameError: name 'headersprint' is not defined

支持,然而可以把抽奖奖励显示出来保存到本地吗

什么鬼

Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

RESTART: C:\Users\Administrator\Desktop\bilibili-live-tools-master\applogin.py
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\bilibili-live-tools-master\applogin.py", line 4, in
from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'

增加代理

B站是乎针对服务器ip进行封号,建议添加IP代理

提高并发性

弹幕打印并发性太低
但是printf_danmu_msg实现里面 不能允许异步

SyntaxError

python3 main.py
start OK!
Traceback (most recent call last):
  File "run.py", line 1, in <module>
    from OnlineHeart import OnlineHeart
  File "/home/pi/bilibili-live-tools/OnlineHeart.py", line 16
    async def apppost_heartbeat(self):
            ^
SyntaxError: invalid syntax

大佬....有个问题。。

Traceback (most recent call last):
File "applogin.py", line 4, in
from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'
我pip install crypto了 还是报错...

dalao..节奏风暴storm.py怎么用呐

貌似是一个抢节奏风暴的一个东西
里面其他文件也没调用storm.py
单运行就会不断输出 {'message': '', 'code': 0, 'data': [], 'msg': ''}

弹幕处理模块的顽固性问题

目前加入对reader的timeout检测,即外面包裹一层wait,如果35s(30s一次心跳,心跳包会有反馈包)超过且未读到值,那么就是超时。

reset也加入

fin的检测有个诡异的现象,fin是远程发送的,但有时手动关闭wifi会马上fin(reader在接受fin会返回长度为0的bytes),很诡异

总督

总督领取有一定几率,返回空信息,怀疑是请求过快

'NoneType' object is not subscriptable

近24小时后崩了……日志:

[2018-05-29 23:30:02] 心跳
[2018-05-29 23:32:42] 房间  20815  广播道具抽奖结果: 辣条X1
[2018-05-29 23:34:00] 房间  4100738  下播!将切换监听房间
'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/tmp/mnt/sda2/entware/usr/bilibili-live-tools/connect.py", line 35, in recreate
    connect.roomids.append(tmp[i][0])
TypeError: 'NoneType' object is not subscriptable
[2018-05-29 23:35:02] 心跳
[2018-05-29 23:40:03] 心跳
[2018-05-29 23:45:03] 心跳
[2018-05-29 23:50:04] 心跳
[2018-05-29 23:55:04] 心跳
[2018-05-30 00:00:05] 心跳

帐号登陆问题

请问节奏风暴需要在哪登陆的?这个风暴礼物是自动领的吗?

出现总督会停止运行

这两天发现一个问题。出现总督之后,不仅不会领取总督奖励,而且也不会再继续抽奖,只返回心跳。
45 4mt49 72 f9f6 d
python和release中的exe版本都会这样。出现问题的操作系统是win server 2016
请问是因为我漏掉了什么操作吗

猜测b站检测脚本挂机方式以及进行规避

请勿在不相干话题下面任意讨论,会对后续bug跟踪以及其他用户的查询造成严重影响!!!

猜测:如果抽奖次数参与过多、过于频繁,可能导致被检测。

  • 应对措施:设置概率p,p的机率会去参与这个抽奖,1-p的概率放弃抽奖

猜测:不必要的检测是否中奖结果

  • 应对措施:不执行或者以p概率执行lotteryresult对应函数

模拟进入房间操作

  • suggestion: 在进行抽奖时先访问一下直播间,使其能在历史观看中显示出来(未真正实现访问,只是update了观看历史)

猜测:过快的参与活动,没有什么延迟

  • 措施:设置随机延迟时间

猜测:夜晚凌晨时抽奖,高度类似机器人

  • 夜晚凌晨休眠,不进行任何携带cookie的操作

提议:自动满亲密度送礼物

请问有可能实现每日对当前佩戴勋章的直播间满亲密度自动赠送辣条的功能吗?目前手动输入道具编号有些扎心,输入错误后出现错误代码,之后便无法输入任何内容。

格式化

”pc端”以及”app端”建议改成”网页端”和”移动端”
参与活动抽奖显示的”加入成功”和参与小电视的”ok”建议统一改为”已加入,待开奖”

学习一下

刚学习python想一起学习一下大佬登陆部分的源码能写出来不

bug反馈

代码是不是对没有领过任何主播勋章的做判断,刚刚尝试登录后会直接抛出异常
Traceback (most recent call last): File ".\run.py", line 22, in <module> utils.fetch_medal() File "E:\Sublime Text 3\program\bilibili-live-tools\utils.py", line 54, in fetch_medal return roomid,today_feed,day_limit UnboundLocalError: local variable 'roomid' referenced before assignment
snipaste_2018-04-12_21-43-07

有没有对配置文件的说明啊

搜了一圈没搜到

比如appkey和app_secret,感觉使用默认的,很容易被针对封号额。。。

还有其他参数,也不太好猜,每个配置干嘛的。。。。

抽奖实现相关问题

log显示这样
检测到房间 36979 的活动抽奖
移动端活动抽奖结果: 辣条X1
网页端活动抽奖状态: 加入成功
移动端活动抽奖结果: 辣条X1
网页端活动抽奖状态: 加入成功
当前时间: 2018-03-24 11:11:29
检测到房间 36979 的活动抽奖
移动端活动抽奖结果: 辣条X1
网页端活动抽奖状态: 加入成功
当前时间: 2018-03-24 11:11:31
检测到房间 36979 的活动抽奖

看不懂的提示。。。

Task exception was never retrieved
future: <Task finished coro=<bilibiliClient.connectServer() done, defined at /private/var/mobile/Containers/Shared/AppGroup/6477072F-46E3-43B7-9C2B-4877AD7187C2/File Provider Storage/Repositories/bilibili-live-tools/bilibiliCilent.py:21> exception=error('unpack requires a bytes object of length 4',)>
Traceback (most recent call last):
File "/var/containers/Bundle/Application/9F565D30-C54B-4210-902B-874D7A5AB814/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/private/var/mobile/Containers/Shared/AppGroup/6477072F-46E3-43B7-9C2B-4877AD7187C2/File Provider Storage/Repositories/bilibili-live-tools/bilibiliCilent.py", line 29, in connectServer
await self.ReceiveMessageLoop()
File "/private/var/mobile/Containers/Shared/AppGroup/6477072F-46E3-43B7-9C2B-4877AD7187C2/File Provider Storage/Repositories/bilibili-live-tools/bilibiliCilent.py", line 58, in ReceiveMessageLoop
expr, = unpack('!I', tmp)
struct.error: unpack requires a bytes object of length 4

使用config配置文件

debug字段可以方便我们调试
后续的platform可以直接自己改
简单api的修改可以丢到这里面
选择运行任务可以扔到里面(本次是想读取弹幕还是挂件抽奖)
bilibili文件的一部分可以丢过来
如果是后面挂代理也可以丢配置过来

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.