{"id":15649017,"url":"https://github.com/cssxsh/weibo-helper","last_synced_at":"2025-07-23T00:07:57.035Z","repository":{"id":45573551,"uuid":"308808365","full_name":"cssxsh/weibo-helper","owner":"cssxsh","description":"Mirai Console 插件开发计划","archived":false,"fork":false,"pushed_at":"2023-09-11T06:34:38.000Z","size":669,"stargazers_count":40,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T14:48:38.406Z","etag":null,"topics":["mirai","mirai-console","qqbot","weibo"],"latest_commit_sha":null,"homepage":"https://github.com/users/cssxsh/projects/4","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssxsh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-31T05:09:26.000Z","updated_at":"2025-03-04T03:10:11.000Z","dependencies_parsed_at":"2024-10-03T12:27:48.171Z","dependency_job_id":"1a13a8bb-e406-41f3-b92a-e6323428c3c1","html_url":"https://github.com/cssxsh/weibo-helper","commit_stats":null,"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/cssxsh/weibo-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fweibo-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fweibo-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fweibo-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fweibo-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssxsh","download_url":"https://codeload.github.com/cssxsh/weibo-helper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fweibo-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266592315,"owners_count":23953109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mirai","mirai-console","qqbot","weibo"],"created_at":"2024-10-03T12:27:25.369Z","updated_at":"2025-07-23T00:07:57.004Z","avatar_url":"https://github.com/cssxsh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Weibo Helper](https://github.com/cssxsh/weibo-helper)\n\n\u003e 基于 [Mirai Console](https://github.com/mamoe/mirai-console) 的 [微博](https://weibo.com/) 转发插件\n\n[![Release](https://img.shields.io/github/v/release/cssxsh/weibo-helper)](https://github.com/cssxsh/weibo-helper/releases)\n[![Downloads](https://img.shields.io/github/downloads/cssxsh/weibo-helper/total)](https://shields.io/category/downloads)\n[![MiraiForum](https://img.shields.io/badge/post-on%20MiraiForum-yellow)](https://mirai.mamoe.net/topic/212)\n\n**使用前应该查阅的相关文档或项目**\n\n* [User Manual](https://github.com/mamoe/mirai/blob/dev/docs/UserManual.md)\n* [Permission Command](https://github.com/mamoe/mirai/blob/dev/mirai-console/docs/BuiltInCommands.md#permissioncommand)\n* [Chat Command](https://github.com/project-mirai/chat-command)\n\n插件基于PC网页版微博API，使用插件需要[登录](#登录指令)一个微博账号   \n插件初始化时，如果恢复登录状态失败，则会尝试模拟游客\n\n## 指令\n\n注意: 使用前请确保可以 [在聊天环境执行指令](https://github.com/project-mirai/chat-command)  \n带括号的 `/` 前缀是可选的  \n`\u003c...\u003e` 中的是指令名，由空格隔开表示或，选择其中任一名称都可执行例如 `/微博用户 订阅`  \n`[...]` 表示参数，当 `[...]` 后面带 `?` 时表示参数可选  \n`{...}` 表示连续的多个参数\n\n本插件指令权限ID 格式为 `xyz.cssxsh.mirai.plugin.weibo-helper:command.*`, `*` 是指令的第一指令名  \n例如 `/微博用户 订阅` 的权限ID为 `xyz.cssxsh.mirai.plugin.weibo-helper:command.wuser`\n\n`[subject]?`订阅的接收对象，可选参数, 默认填充当前聊天环境\n\n### 登录指令\n\n| 指令               | 描述       |\n|:-----------------|:---------|\n| `/\u003cwlogin 微博登录\u003e` | 登录一个微博账号 |\n\n使用指令后，机器人会发送网页登录的二维码  \n使用手机微博APP扫描确认登录后  \n如果成功登录，则会回复 `@用户名#ID 登陆成功` 的消息\n\n### 用户订阅指令\n\n| 指令                                              | 描述         |\n|:------------------------------------------------|:-----------|\n| `/\u003cwuser 微博用户\u003e \u003cadd, task 订阅\u003e [uid] [subject]?` | 订阅一个微博账号   |\n| `/\u003cwuser 微博用户\u003e \u003cstop 停止\u003e [uid] [subject]?`      | 取消订阅一个微博账号 |\n| `/\u003cwuser 微博用户\u003e \u003cdetail 详情\u003e [subject]?`          | 查看订阅详情     |\n\n`uid` 是用户的ID，可以在用户的主页获得，  \n例如 \u003chttps://www.weibo.com/u/1111681197\u003e 的 `1111681197`  \n使用订阅指令后，如果成功找到指定用户，则会回复  \n`对@用户名#ID 的监听任务, 添加完成`\n\n### 分组订阅指令\n\n| 指令                                             | 描述          |\n|:-----------------------------------------------|:------------|\n| `/\u003cwgroup 微博分组\u003e \u003clist 列表\u003e`                     | 列出当前账号的微博分组 |\n| `/\u003cwgroup 微博分组\u003e \u003cadd task 订阅\u003e [id] [subject]?` | 订阅一个微博分组    |\n| `/\u003cwgroup 微博分组\u003e \u003cstop 停止\u003e [id] [subject]?`     | 取消订阅一个微博分组  |\n| `/\u003cwgroup 微博分组\u003e \u003cdetail 详情\u003e [subject]?`        | 查看订阅详情      |\n\n`id` 是分组的GID或者TITLE，GID可以在分组的页面获得，   \n例如 \u003chttps://www.weibo.com/mygroups?gid=3893924734832698\u003e 的 `3893924734832698`  \n也可以通过列表指令获得，使用列表指令之后会按行回复 `title -\u003e gid`  \n使用订阅指令后，如果成功找到指定分组，则会回复  \n`对分组标题#ID的监听任务, 添加完成`\n\n### 热搜订阅指令\n\n| 指令                                             | 描述         |\n|:-----------------------------------------------|:-----------|\n| `/\u003cwhot 微博热搜\u003e \u003cadd task 订阅\u003e [word] [subject]?` | 订阅一个微博热搜   |\n| `/\u003cwhot 微博热搜\u003e \u003cstop 停止\u003e [word] [subject]?`     | 取消订阅一个微博热搜 |\n| `/\u003cwhot 微博热搜\u003e \u003cdetail 详情\u003e [subject]?`          | 查看订阅详情     |\n\n### 博文查看指令\n\n| 指令                           | 描述       |\n|:-----------------------------|:---------|\n| `/\u003cwdetail blog 微博详情\u003e [mid]` | 查看指定微博内容 |\n\n### 关注指令\n\n| 指令                      | 描述     |\n|:------------------------|:-------|\n| `/\u003cwfollow 微博关注\u003e [uid]` | 关注指定用户 |\n\n## 解析微博链接\n\n机器人会将群里中的微博链接捕获，并将微博内容回复给发送微博链接的人   \n这个功能默认开启，通过权限 `xyz.cssxsh.mirai.plugin.weibo-helper:quiet.group` 设置不开启的群聊\n\n## 配置\n\n位于 `Mirai-Console` 运行目录下的 `config/xyz.cssxsh.mirai.plugin.weibo-helper` 文件夹下的 `WeiboHelperSettings` 文件\n\n* `cache` 图片缓存位置\n* `expire` 图片缓存过期时间，单位小时，默认3天，为0时不会过期\n* `following` 是否清理收藏的用户的缓存，默认 true\n* `fast` 快速轮询间隔，单位分钟\n* `slow` 慢速轮询间隔，单位分钟\n* `contact` 登录状态失效联系人，当微博的登录状态失效时会向这个QQ号发送消息\n* `repost` 微博订阅器，最少转发数过滤器，只对列表订阅生效，默认16\n* `users` 微博订阅器，屏蔽用户\n* `regexes` 微博订阅器，屏蔽的关键词正则表达式\n* `urls` 微博订阅器，屏蔽的URL类型, 屏蔽视频可以尝试填入`39`\n* `original` 只接受原创内容，屏蔽转发\n* `video` 发送微博视频文件\n* `emoticon` 处理微博表情\n* `picture` 图片设置\n* `cover` 封面设置\n* `history` 历史记录保留时间，单位天，默认 7d\n* `timeout` Http 超时时间，单位毫秒，默认 60_000 ms\n* `forward` 以转发消息的方式发送订阅微博\n* `show_url` 是否显示url\n* `interval` 自动解析同样内容的间隔，单位毫秒，默认 600_000 ms\n\n## 图片设置\n\n有四种设置方案\n\n* 一张也不显示\n```yaml\npicture: \n  type: none\n  value: {}\n```\n\n* 全部显示\n```yaml\npicture: \n  type: all\n  value: {}\n```\n\n* 最多显示total张\n```yaml\npicture: \n  type: limit\n  value:\n    total: 3\n```\n\n* 超过total张一张也不显示\n```yaml\npicture: \n  type: top\n  value:\n    total: 3\n```\n\n### 自动解析\n\n~~安静群聊, 不解析URL链接, 通过权限系统配置~~  \n`/perm add g12345 xyz.cssxsh.mirai.plugin.weibo-helper:quiet.group`  \n改为 `xyz.cssxsh.mirai.plugin.weibo-helper:auto.parser`  \n持有权限的用户(群员)才会触发自动解析\n\n## 安装\n\n### MCL 指令安装\n\n**请确认 mcl.jar 的版本是 2.1.0+**  \n`./mcl --update-package xyz.cssxsh:weibo-helper --channel maven-stable --type plugins`\n\n### 手动安装\n\n1. 从 [Releases](https://github.com/cssxsh/weibo-helper/releases) 或者 [Maven](https://repo1.maven.org/maven2/xyz/cssxsh/weibo-helper/) 下载 `mirai2.jar`\n2. 将其放入 `plugins` 文件夹中\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fweibo-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssxsh%2Fweibo-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fweibo-helper/lists"}