MountainDash / nonebot-bison

A nonebot2 plugin to repost social media posts to QQ group
https://nonebot-bison.netlify.app
MIT License
166 stars 35 forks source link

[bilibili-live]B站直播订阅,下播缺少图片报错 #626

Open gongfuture opened 1 month ago

gongfuture commented 1 month ago

环境

问题

B站直播订阅,开播和标题更改都能正常推送,唯独下播不能正常推送

日志

NapCat日志

2024-09-22 22:28:31 [DEBUG] **Bot(259***688) | [OneBot] [WebSocket Client] 收到正向Websocket消息 {"action":"send_msg","params":{"message":[{"type":"image","data":{"file":"base64://iVBORw0KGgoAAAANSUhEUgAAAyAAAAD6CAIAAADWX7TrAAAAAXNSR0IArs4c6QAAIABJREFUeJzt3XtQU9faP/DnfYfLECfBkTAiUOVSymUOhNogiKAnVfBCR2gPHIs9glV7kGPFCzhirelb1Ioj1Iq1qEWteir2yLHiFKyXlioUC6bWgL+ApVy0EHUIjiQjDISZ/v7IhdxJYKNgv5/xD9zZ2dkJIfubtZ611v/88ccfBAAAAADM+d9nfQIAAAAAzxsELAAAAACGIWABAAAAMAwBCwAAAIBhCFgAAAAADEPAAgAAAGAYAhYAAAAAwxCwAAAAABiGgAUAAADAMAQsAAAAAIYhYAEAAAAwDAELAAAAgGEIWAAAAAAMQ8ACAAAAYBgCFgAAAADDELAAAAAAGIaABQAAAMAwBCwAAAAAhiFgAQAAADAMAQsAAACAYQhYAAAAAAxDwAIAAABgGAIWAAAAAMMQsAAAAAAYhoAFAAA...","type":null,"cache":"true","proxy":"true","timeout":null}},{"type":"text","data":{"text":"详情: https://live.bilibili.com/23***09"}},{"type":"image","data":{"file":"","type":null,"cache":"true","proxy":"true","timeout":null}}],"message_type":"group","group_id":611***274},"echo":"33"} 
2024-09-22 22:28:31 [ERROR] **Bot(259***688) | 文件消息缺少参数 {"file":"","type":null,"cache":"true","proxy":"true","timeout":null} 
2024-09-22 22:28:31 [ERROR]**Bot(259***688) | 发生错误 Error: 文件消息缺少参数
    at OneBotMsgApi.handleOb11FileLikeMessage (file:///D:/NapCat/NapCatQQ/napcat.mjs:29982:13)
    at Object.image (file:///D:/NapCat/NapCatQQ/napcat.mjs:29676:21)
    at OneBotMsgApi.createSendElements (file:///D:/NapCat/NapCatQQ/napcat.mjs:29926:64)
    at SendMsg._handle (file:///D:/NapCat/NapCatQQ/napcat.mjs:36706:85)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SendMsg.websocketHandle (file:///D:/NapCat/NapCatQQ/napcat.mjs:36606:23)
    at async OB11ActiveWebSocketAdapter.handleMessage (file:///D:/NapCat/NapCatQQ/napcat.mjs:12792:21) 

NoneBot日志

09-22 22:28:29 [INFO] nonebot_bison | status changes bilibili-live 455***741: title='***' room_id=23***09 uid=455***741 live_time=172***186 live_status=<LiveStatus.ON: 1> area_name='其他单机' uname='***' face='https://i1.hdslb.com/bfs/face/ee63384881e3d3ed998b615eb0d6c718b9205fe5.jpg' cover='https://i0.hdslb.com/bfs/live/new_room_cover/5e1f493bc98c903e2706d9c953e69d8f296a3d3e.jpg' keyframe='https://i0.hdslb.com/bfs/live-key-frame/keyframe09222226000023868809hxo0zq.jpg' category=0 -> title='***' room_id=23***09 uid=455***741 live_time=0 live_status=<LiveStatus.OFF: 0> area_name='其他单机' uname='***' face='https://i1.hdslb.com/bfs/face/ee63384881e3d3ed998b615eb0d6c718b9205fe5.jpg' cover='https://i0.hdslb.com/bfs/live/new_room_cover/5e1f493bc98c903e2706d9c953e69d8f296a3d3e.jpg' keyframe='' category=0
09-22 22:28:29 [INFO] nonebot_bison | send to platform_type=<SupportedPlatform.qq_group: 'QQ Group'> group_id=611***274: ## Post: 26D86FCDB70 ##

来源: <Platform bilibili-live>
附加信息:
- compress: True
- title: '[下播] ***'
- images: ['']
- url: 'https://live.bilibili.com/23***09'
- nickname: '*** 其他单机'

~话说issue模板用yml写是不是更好()~

AzideCupric commented 1 month ago

下播会没有关键帧截图?好奇怪(

AzideCupric commented 1 month ago

话说issue模板用yml写是不是更好()

yml写 是指?

gongfuture commented 1 month ago

话说issue模板用yml写是不是更好()

yml写 是指?

https://github.com/ZWolken/Light-Novel-Yuedu-Source/tree/main/.github/ISSUE_TEMPLATE 大概像这个样子

name: Bug Report 反馈Bug / 错误
description: 创建一个issue来报告使用的过程中发现的错误等
title: "[Bug] "
labels: ["Bug"]
body:

  - type: checkboxes
    id: checklist
    attributes:
      label: 在开始反馈前,请检查已有的issue:
      description: 如果你的问题是重复的,将不会被回复并直接关闭。
      options:
        - label: 我的问题从未被其他人提及过,且不是重复的。
          required: true
        - label: 我正在使用最新发行版的书源,没有使用过时的。

  - type: textarea
    id: bug
    attributes:
      label: 问题描述
      description: 请对您Bug/错误的现象进行清晰的描述,并尽量简短。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: step
    attributes:
      label: 复现步骤
      description: 请提供必要的复现行为的步骤。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: behavior
    attributes:
      label: 预期行为
      description: 请描述此bug的预期行为。(支持Markdown、图片、附件)

  - type: input
    id: legado_ver
    attributes:
      label: 阅读APP版本
      placeholder: "Example: 3.25"
    validations:
      required: true

  - type: textarea
    id: log
    attributes:
      label: 日志Log
      description: 请提供含报错的阅读APP日志文件。
      render: shell

  - type: textarea
    id: context
    attributes:
      label: 其他信息
      description: 在这里输入任何其他相关信息。(支持Markdown、图片、附件)

  - type: checkboxes
    id: acknowledgements
    attributes:
      label: 注意事项
      description: 请注意:
      options:
        - label: 我已知晓该仓库维护者仅会在能力范围内进行Bug/错误解答修复,能力范围以外的可能不会修复。
          required: true

最后效果是这个样子的 image

gongfuture commented 1 month ago

下播会没有关键帧截图?好奇怪(

但是下播还是有封面的,所以大概可以用封面返回?

顺便我也发现了没有做直播间封禁检测,因为我直播间昨天被封了()

AzideCupric commented 1 month ago

话说issue模板用yml写是不是更好()

yml写 是指?

https://github.com/ZWolken/Light-Novel-Yuedu-Source/tree/main/.github/ISSUE_TEMPLATE 大概像这个样子

name: Bug Report 反馈Bug / 错误
description: 创建一个issue来报告使用的过程中发现的错误等
title: "[Bug] "
labels: ["Bug"]
body:

  - type: checkboxes
    id: checklist
    attributes:
      label: 在开始反馈前,请检查已有的issue:
      description: 如果你的问题是重复的,将不会被回复并直接关闭。
      options:
        - label: 我的问题从未被其他人提及过,且不是重复的。
          required: true
        - label: 我正在使用最新发行版的书源,没有使用过时的。

  - type: textarea
    id: bug
    attributes:
      label: 问题描述
      description: 请对您Bug/错误的现象进行清晰的描述,并尽量简短。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: step
    attributes:
      label: 复现步骤
      description: 请提供必要的复现行为的步骤。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: behavior
    attributes:
      label: 预期行为
      description: 请描述此bug的预期行为。(支持Markdown、图片、附件)

  - type: input
    id: legado_ver
    attributes:
      label: 阅读APP版本
      placeholder: "Example: 3.25"
    validations:
      required: true

  - type: textarea
    id: log
    attributes:
      label: 日志Log
      description: 请提供含报错的阅读APP日志文件。
      render: shell

  - type: textarea
    id: context
    attributes:
      label: 其他信息
      description: 在这里输入任何其他相关信息。(支持Markdown、图片、附件)

  - type: checkboxes
    id: acknowledgements
    attributes:
      label: 注意事项
      description: 请注意:
      options:
        - label: 我已知晓该仓库维护者仅会在能力范围内进行Bug/错误解答修复,能力范围以外的可能不会修复。
          required: true

最后效果是这个样子的 image

@felinae98

gongfuture commented 1 month ago

话说issue模板用yml写是不是更好()

yml写 是指?

https://github.com/ZWolken/Light-Novel-Yuedu-Source/tree/main/.github/ISSUE_TEMPLATE 大概像这个样子

name: Bug Report 反馈Bug / 错误
description: 创建一个issue来报告使用的过程中发现的错误等
title: "[Bug] "
labels: ["Bug"]
body:

  - type: checkboxes
    id: checklist
    attributes:
      label: 在开始反馈前,请检查已有的issue:
      description: 如果你的问题是重复的,将不会被回复并直接关闭。
      options:
        - label: 我的问题从未被其他人提及过,且不是重复的。
          required: true
        - label: 我正在使用最新发行版的书源,没有使用过时的。

  - type: textarea
    id: bug
    attributes:
      label: 问题描述
      description: 请对您Bug/错误的现象进行清晰的描述,并尽量简短。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: step
    attributes:
      label: 复现步骤
      description: 请提供必要的复现行为的步骤。(支持Markdown、图片、附件)
    validations:
      required: true

  - type: textarea
    id: behavior
    attributes:
      label: 预期行为
      description: 请描述此bug的预期行为。(支持Markdown、图片、附件)

  - type: input
    id: legado_ver
    attributes:
      label: 阅读APP版本
      placeholder: "Example: 3.25"
    validations:
      required: true

  - type: textarea
    id: log
    attributes:
      label: 日志Log
      description: 请提供含报错的阅读APP日志文件。
      render: shell

  - type: textarea
    id: context
    attributes:
      label: 其他信息
      description: 在这里输入任何其他相关信息。(支持Markdown、图片、附件)

  - type: checkboxes
    id: acknowledgements
    attributes:
      label: 注意事项
      description: 请注意:
      options:
        - label: 我已知晓该仓库维护者仅会在能力范围内进行Bug/错误解答修复,能力范围以外的可能不会修复。
          required: true

最后效果是这个样子的 image

@felinae98

我来吧

gongfuture commented 1 month ago

ISSUE模板 #630