dsh-bilibili: Bilibili Widget in DSH's Bottom-Right Corner

DSH (DeepSeek Harness) adopts a plugin-based architecture, allowing developers to integrate various functionalities into their workflows by installing plugins. dsh-bilibili is a plugin designed to enable direct access to Bilibili within the DSH Web interface. It appears as a widget in the bottom right corner, providing login, recommended feed browsing, and in-app playback features. It does not rely on direct browser connections; instead, all outbound network requests are handled by the plugin’s Host side.

Core Features

  1. QR Code Login and Manual Import
    A QR code is generated within the plugin panel, allowing you to log in by scanning it with the Bilibili mobile app. It also supports manually pasting SESSDATA to import login credentials.

  2. Interface Interaction
    After logging in, the collapsed state in the bottom right corner displays the user avatar. The panel provides a recommended feed, supporting “Swap Batch” and “Refresh” functions.

  3. Content Browsing
    Supports viewing search results, history, and the default favorites folder. Both the recommended feed and favorites folder support pagination.

  4. In-app Playback
    Clicking a video card allows direct playback within the panel, supporting progress dragging and resume playback. Middle-clicking or Ctrl+clicking will still open Bilibili in a new tab.

Installation and Enablement

Execute the following steps in the terminal:

# 1. 进入 DSH 的 web profile 目录
cd ~/.dsh/profiles/web

# 2. 安装插件(替换 /path/to/dsh-bilibili 为实际路径)
pnpm add /path/to/dsh-bilibili

After installation, append the configuration to cordis.patch.yml:

- insert:
    - id: dsh-bilibili
      name: dsh-bilibili

Finally, restart the DSH process. Note: Host-side code is only loaded when DSH starts. You must restart it for changes to index.js to take effect.

Usage Instructions

  1. Open the panel and click the QR code icon.
  2. Scan the code with the Bilibili mobile app and confirm on your phone.
  3. After successful login, click the avatar in the bottom right corner to expand the panel.
  4. Click any video card to play it within the panel.

Limitations and Notes

  • Permission Risk: SESSDATA possesses full account login privileges. It is recommended to use a secondary account to mitigate risk control measures.
  • API Limitations: Since unofficial APIs are used, Bilibili may impose rate limiting or risk control measures on the account.
  • Credential Expiration: Login credentials expire after approximately a few months. You will be prompted to re-import them once they expire.
  • Feature Scope: Only reads the default favorites folder (cannot switch to others); only supports videos (anime/live streams/dynamics do not appear in history); playback resolution is fixed at 720p (qn=64).
  • Architectural Constraint: Video streams must be proxied through the plugin’s Host side; otherwise, the CDN will return a 403 error due to a missing Referer.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye