nonebot-bison


Namenonebot-bison JSON
Version 0.9.2 PyPI version JSON
download
home_pagehttps://github.com/felinae98/nonebot-bison
SummarySubscribe message from social medias
upload_time2024-03-29 07:16:32
maintainerNone
docs_urlNone
authorfelinae98
requires_python<4.0.0,>=3.10
licenseMIT
keywords nonebot nonebot2 qqbot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# Bison

_✨ 通用订阅推送插件 ✨_

<a href="https://raw.githubusercontent.com/MountainDash/nonebot-bison/main/LICENSE">
    <img src="https://img.shields.io/github/license/MountainDash/nonebot-bison" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-bison">
    <img src="https://img.shields.io/pypi/v/nonebot-bison?logo=python&logoColor=edb641" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue?logo=python&logoColor=edb641" alt="python">
<a href="https://github.com/psf/black">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641" alt="black">
</a>
<a href="https://github.com/astral-sh/ruff">
    <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" alt="ruff">
</a>
<br />
<a href="https://codecov.io/gh/MountainDash/nonebot-bison">
    <img src="https://codecov.io/gh/MountainDash/nonebot-bison/branch/main/graph/badge.svg?token=QCFIODJOOA" alt="codecov"/>
</a>
<a href="https://github.com/MountainDash/nonebot-bison/actions/workflows/main.yml.yml">
    <img src="https://github.com/MountainDash/nonebot-bison/actions/workflows/main.yml/badge.svg?branch=main&event=push" alt="action"/>
</a>
<a href="https://results.pre-commit.ci/latest/github/MountainDash/nonebot-bison/main">
    <img src="https://results.pre-commit.ci/badge/github/MountainDash/nonebot-bison/main.svg" alt="pre-commit" />
</a>
<a href="https://github.com/MountainDash/nonebot-bison/actions/workflows/ruff.yml">
    <img src="https://github.com/MountainDash/nonebot-bison/actions/workflows/ruff.yml/badge.svg?branch=main&event=push" alt="ruff">
</a>

<br />
<a href="https://nonebot-bison.netlify.app/" target="__blank">
    <strong>📖 官方文档</strong>
  </a>
  &nbsp;&nbsp;|&nbsp;&nbsp;
  <a href="https://nonebot-bison.netlify.app/usage/easy-use.html" target="__blank">
    <strong>🚀 快速开始</strong>
  </a>
  &nbsp;&nbsp;|&nbsp;&nbsp;
  <a href="https://qm.qq.com/q/7DH4H3hbaw" target="__blank">
    <strong>💬 讨论交流</strong>
  </a>

</div>

## 简介

一款自动爬取各种站点,社交平台更新动态,并将信息推送到 QQ 的机器人。
基于 [`NoneBot2`](https://github.com/nonebot/nonebot2) 开发(诞生于明日方舟的蹲饼活动)

<details>
<summary>本项目原名原名 nonebot-hk-reporter</summary>

寓意本 Bot 要做全世界跑的最快的搬运机器人,后因名字过于暴力改名

</details>
本项目名称来源于明日方舟角色拜松——一名龙门的信使,曾经骑自行车追上骑摩托车的德克萨斯

支持的平台:

- 微博
- Bilibili
- Bilibili 直播
- RSS
- 明日方舟
- 网易云音乐
- FF14

## 功能

- [x] 定时爬取指定网站
- [x] 通过图片发送文本,防止风控
- [x] 使用队列限制发送频率
- [x] 使用网页后台管理 Bot 订阅
- [ ] 使用可以设置权重的调度器按时间调节不同账号的权重

## 使用方法

**!! 注意,如果要使用后台管理功能请使用 pypi 版本或者 docker 版本,如果直接 clone 源代码
需要按下面方式进行 build**

```bash
cd ./admin-frontend
pnpm && pnpm run build
```

可以使用 Docker,docker-compose,作为插件安装在 nonebot 中,或者直接运行

在群里 at Bot 或者直接私聊 Bot“添加订阅”,按照提示输入需要订阅的账号,就可以愉快接收消息了。

参考[文档](https://nonebot-bison.vercel.app/usage/#%E4%BD%BF%E7%94%A8)

## FAQ

1. 报错`TypeError: 'type' object is not subscriptable`  
   本项目使用了 Python 3.10 的语法,请将 Python 版本升级到 3.10 及以上,推荐使用 docker 部署
2. bot 不理我  
   请确认自己是群主或者管理员,并且检查`COMMAND_START`环境变量是否设为`[""]`
   或者按照`COMMAND_START`中的设置添加命令前缀,例:
   `COMMAND_START=["/"]`则应发送`/添加订阅`
3. 微博漏订阅了
   微博更新了新的风控措施,某些含有某些关键词的微博会获取不到。
4. 无法使用后台管理页面
   1. 确认自己正确配置了 nonebot 的端口,如果在远程或容器外访问网页请确保`HOST=0.0.0.0`
   2. 确认自己的云服务器的防火墙配置正确
   3. 确认自己使用了正确的方法安装插件

## 参与开发

欢迎各种 PR,参与开发本插件很简单,只需要对相应平台完成几个接口的编写就行。你只需要一点简单的爬虫知识就行。

如果对整体框架有任何意见或者建议,欢迎 issue。

## 鸣谢

- [`go-cqhttp`](https://github.com/Mrs4s/go-cqhttp):简单又完善的 cqhttp 实现
- [`NoneBot2`](https://github.com/nonebot/nonebot2):超好用的开发框架
- [`HarukaBot`](https://github.com/SK-415/HarukaBot/): 借鉴了大体的实现思路
- [`rsshub`](https://github.com/DIYgod/RSSHub):提供了大量的 api

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/felinae98/nonebot-bison",
    "name": "nonebot-bison",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.10",
    "maintainer_email": null,
    "keywords": "nonebot, nonebot2, qqbot",
    "author": "felinae98",
    "author_email": "felinae225@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/39/2f8297fe3ab7c3a734ac4f8dbd388c45dad6e2b8d49ef8f8f99faa9cd3d3/nonebot_bison-0.9.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# Bison\n\n_\u2728 \u901a\u7528\u8ba2\u9605\u63a8\u9001\u63d2\u4ef6 \u2728_\n\n<a href=\"https://raw.githubusercontent.com/MountainDash/nonebot-bison/main/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/MountainDash/nonebot-bison\" alt=\"license\">\n</a>\n<a href=\"https://pypi.python.org/pypi/nonebot-bison\">\n    <img src=\"https://img.shields.io/pypi/v/nonebot-bison?logo=python&logoColor=edb641\" alt=\"pypi\">\n</a>\n<img src=\"https://img.shields.io/badge/python-3.8+-blue?logo=python&logoColor=edb641\" alt=\"python\">\n<a href=\"https://github.com/psf/black\">\n    <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641\" alt=\"black\">\n</a>\n<a href=\"https://github.com/astral-sh/ruff\">\n    <img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\" alt=\"ruff\">\n</a>\n<br />\n<a href=\"https://codecov.io/gh/MountainDash/nonebot-bison\">\n    <img src=\"https://codecov.io/gh/MountainDash/nonebot-bison/branch/main/graph/badge.svg?token=QCFIODJOOA\" alt=\"codecov\"/>\n</a>\n<a href=\"https://github.com/MountainDash/nonebot-bison/actions/workflows/main.yml.yml\">\n    <img src=\"https://github.com/MountainDash/nonebot-bison/actions/workflows/main.yml/badge.svg?branch=main&event=push\" alt=\"action\"/>\n</a>\n<a href=\"https://results.pre-commit.ci/latest/github/MountainDash/nonebot-bison/main\">\n    <img src=\"https://results.pre-commit.ci/badge/github/MountainDash/nonebot-bison/main.svg\" alt=\"pre-commit\" />\n</a>\n<a href=\"https://github.com/MountainDash/nonebot-bison/actions/workflows/ruff.yml\">\n    <img src=\"https://github.com/MountainDash/nonebot-bison/actions/workflows/ruff.yml/badge.svg?branch=main&event=push\" alt=\"ruff\">\n</a>\n\n<br />\n<a href=\"https://nonebot-bison.netlify.app/\" target=\"__blank\">\n    <strong>\ud83d\udcd6 \u5b98\u65b9\u6587\u6863</strong>\n  </a>\n  &nbsp;&nbsp;|&nbsp;&nbsp;\n  <a href=\"https://nonebot-bison.netlify.app/usage/easy-use.html\" target=\"__blank\">\n    <strong>\ud83d\ude80 \u5feb\u901f\u5f00\u59cb</strong>\n  </a>\n  &nbsp;&nbsp;|&nbsp;&nbsp;\n  <a href=\"https://qm.qq.com/q/7DH4H3hbaw\" target=\"__blank\">\n    <strong>\ud83d\udcac \u8ba8\u8bba\u4ea4\u6d41</strong>\n  </a>\n\n</div>\n\n## \u7b80\u4ecb\n\n\u4e00\u6b3e\u81ea\u52a8\u722c\u53d6\u5404\u79cd\u7ad9\u70b9\uff0c\u793e\u4ea4\u5e73\u53f0\u66f4\u65b0\u52a8\u6001\uff0c\u5e76\u5c06\u4fe1\u606f\u63a8\u9001\u5230 QQ \u7684\u673a\u5668\u4eba\u3002\n\u57fa\u4e8e [`NoneBot2`](https://github.com/nonebot/nonebot2) \u5f00\u53d1\uff08\u8bde\u751f\u4e8e\u660e\u65e5\u65b9\u821f\u7684\u8e72\u997c\u6d3b\u52a8\uff09\n\n<details>\n<summary>\u672c\u9879\u76ee\u539f\u540d\u539f\u540d nonebot-hk-reporter</summary>\n\n\u5bd3\u610f\u672c Bot \u8981\u505a\u5168\u4e16\u754c\u8dd1\u7684\u6700\u5feb\u7684\u642c\u8fd0\u673a\u5668\u4eba\uff0c\u540e\u56e0\u540d\u5b57\u8fc7\u4e8e\u66b4\u529b\u6539\u540d\n\n</details>\n\u672c\u9879\u76ee\u540d\u79f0\u6765\u6e90\u4e8e\u660e\u65e5\u65b9\u821f\u89d2\u8272\u62dc\u677e\u2014\u2014\u4e00\u540d\u9f99\u95e8\u7684\u4fe1\u4f7f\uff0c\u66fe\u7ecf\u9a91\u81ea\u884c\u8f66\u8ffd\u4e0a\u9a91\u6469\u6258\u8f66\u7684\u5fb7\u514b\u8428\u65af\n\n\u652f\u6301\u7684\u5e73\u53f0\uff1a\n\n- \u5fae\u535a\n- Bilibili\n- Bilibili \u76f4\u64ad\n- RSS\n- \u660e\u65e5\u65b9\u821f\n- \u7f51\u6613\u4e91\u97f3\u4e50\n- FF14\n\n## \u529f\u80fd\n\n- [x] \u5b9a\u65f6\u722c\u53d6\u6307\u5b9a\u7f51\u7ad9\n- [x] \u901a\u8fc7\u56fe\u7247\u53d1\u9001\u6587\u672c\uff0c\u9632\u6b62\u98ce\u63a7\n- [x] \u4f7f\u7528\u961f\u5217\u9650\u5236\u53d1\u9001\u9891\u7387\n- [x] \u4f7f\u7528\u7f51\u9875\u540e\u53f0\u7ba1\u7406 Bot \u8ba2\u9605\n- [ ] \u4f7f\u7528\u53ef\u4ee5\u8bbe\u7f6e\u6743\u91cd\u7684\u8c03\u5ea6\u5668\u6309\u65f6\u95f4\u8c03\u8282\u4e0d\u540c\u8d26\u53f7\u7684\u6743\u91cd\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n**!! \u6ce8\u610f\uff0c\u5982\u679c\u8981\u4f7f\u7528\u540e\u53f0\u7ba1\u7406\u529f\u80fd\u8bf7\u4f7f\u7528 pypi \u7248\u672c\u6216\u8005 docker \u7248\u672c\uff0c\u5982\u679c\u76f4\u63a5 clone \u6e90\u4ee3\u7801\n\u9700\u8981\u6309\u4e0b\u9762\u65b9\u5f0f\u8fdb\u884c build**\n\n```bash\ncd ./admin-frontend\npnpm && pnpm run build\n```\n\n\u53ef\u4ee5\u4f7f\u7528 Docker\uff0cdocker-compose\uff0c\u4f5c\u4e3a\u63d2\u4ef6\u5b89\u88c5\u5728 nonebot \u4e2d\uff0c\u6216\u8005\u76f4\u63a5\u8fd0\u884c\n\n\u5728\u7fa4\u91cc at Bot \u6216\u8005\u76f4\u63a5\u79c1\u804a Bot\u201c\u6dfb\u52a0\u8ba2\u9605\u201d\uff0c\u6309\u7167\u63d0\u793a\u8f93\u5165\u9700\u8981\u8ba2\u9605\u7684\u8d26\u53f7\uff0c\u5c31\u53ef\u4ee5\u6109\u5feb\u63a5\u6536\u6d88\u606f\u4e86\u3002\n\n\u53c2\u8003[\u6587\u6863](https://nonebot-bison.vercel.app/usage/#%E4%BD%BF%E7%94%A8)\n\n## FAQ\n\n1. \u62a5\u9519`TypeError: 'type' object is not subscriptable`  \n   \u672c\u9879\u76ee\u4f7f\u7528\u4e86 Python 3.10 \u7684\u8bed\u6cd5\uff0c\u8bf7\u5c06 Python \u7248\u672c\u5347\u7ea7\u5230 3.10 \u53ca\u4ee5\u4e0a\uff0c\u63a8\u8350\u4f7f\u7528 docker \u90e8\u7f72\n2. bot \u4e0d\u7406\u6211  \n   \u8bf7\u786e\u8ba4\u81ea\u5df1\u662f\u7fa4\u4e3b\u6216\u8005\u7ba1\u7406\u5458\uff0c\u5e76\u4e14\u68c0\u67e5`COMMAND_START`\u73af\u5883\u53d8\u91cf\u662f\u5426\u8bbe\u4e3a`[\"\"]`\n   \u6216\u8005\u6309\u7167`COMMAND_START`\u4e2d\u7684\u8bbe\u7f6e\u6dfb\u52a0\u547d\u4ee4\u524d\u7f00\uff0c\u4f8b\uff1a\n   `COMMAND_START=[\"/\"]`\u5219\u5e94\u53d1\u9001`/\u6dfb\u52a0\u8ba2\u9605`\n3. \u5fae\u535a\u6f0f\u8ba2\u9605\u4e86\n   \u5fae\u535a\u66f4\u65b0\u4e86\u65b0\u7684\u98ce\u63a7\u63aa\u65bd\uff0c\u67d0\u4e9b\u542b\u6709\u67d0\u4e9b\u5173\u952e\u8bcd\u7684\u5fae\u535a\u4f1a\u83b7\u53d6\u4e0d\u5230\u3002\n4. \u65e0\u6cd5\u4f7f\u7528\u540e\u53f0\u7ba1\u7406\u9875\u9762\n   1. \u786e\u8ba4\u81ea\u5df1\u6b63\u786e\u914d\u7f6e\u4e86 nonebot \u7684\u7aef\u53e3\uff0c\u5982\u679c\u5728\u8fdc\u7a0b\u6216\u5bb9\u5668\u5916\u8bbf\u95ee\u7f51\u9875\u8bf7\u786e\u4fdd`HOST=0.0.0.0`\n   2. \u786e\u8ba4\u81ea\u5df1\u7684\u4e91\u670d\u52a1\u5668\u7684\u9632\u706b\u5899\u914d\u7f6e\u6b63\u786e\n   3. \u786e\u8ba4\u81ea\u5df1\u4f7f\u7528\u4e86\u6b63\u786e\u7684\u65b9\u6cd5\u5b89\u88c5\u63d2\u4ef6\n\n## \u53c2\u4e0e\u5f00\u53d1\n\n\u6b22\u8fce\u5404\u79cd PR\uff0c\u53c2\u4e0e\u5f00\u53d1\u672c\u63d2\u4ef6\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5bf9\u76f8\u5e94\u5e73\u53f0\u5b8c\u6210\u51e0\u4e2a\u63a5\u53e3\u7684\u7f16\u5199\u5c31\u884c\u3002\u4f60\u53ea\u9700\u8981\u4e00\u70b9\u7b80\u5355\u7684\u722c\u866b\u77e5\u8bc6\u5c31\u884c\u3002\n\n\u5982\u679c\u5bf9\u6574\u4f53\u6846\u67b6\u6709\u4efb\u4f55\u610f\u89c1\u6216\u8005\u5efa\u8bae\uff0c\u6b22\u8fce issue\u3002\n\n## \u9e23\u8c22\n\n- [`go-cqhttp`](https://github.com/Mrs4s/go-cqhttp)\uff1a\u7b80\u5355\u53c8\u5b8c\u5584\u7684 cqhttp \u5b9e\u73b0\n- [`NoneBot2`](https://github.com/nonebot/nonebot2)\uff1a\u8d85\u597d\u7528\u7684\u5f00\u53d1\u6846\u67b6\n- [`HarukaBot`](https://github.com/SK-415/HarukaBot/): \u501f\u9274\u4e86\u5927\u4f53\u7684\u5b9e\u73b0\u601d\u8def\n- [`rsshub`](https://github.com/DIYgod/RSSHub)\uff1a\u63d0\u4f9b\u4e86\u5927\u91cf\u7684 api\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Subscribe message from social medias",
    "version": "0.9.2",
    "project_urls": {
        "Homepage": "https://github.com/felinae98/nonebot-bison"
    },
    "split_keywords": [
        "nonebot",
        " nonebot2",
        " qqbot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3916afe50eacfff434d0fe3516eb8be331b3207b3ccf596a72493a7355a3b683",
                "md5": "46f420fc622844019cbc0fa026a46bf3",
                "sha256": "89baf1ea79856cc365a8ab2d4283052bd01271f82372c0e41d30bcc3f8304d11"
            },
            "downloads": -1,
            "filename": "nonebot_bison-0.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "46f420fc622844019cbc0fa026a46bf3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.10",
            "size": 2323280,
            "upload_time": "2024-03-29T07:16:30",
            "upload_time_iso_8601": "2024-03-29T07:16:30.054931Z",
            "url": "https://files.pythonhosted.org/packages/39/16/afe50eacfff434d0fe3516eb8be331b3207b3ccf596a72493a7355a3b683/nonebot_bison-0.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b392f8297fe3ab7c3a734ac4f8dbd388c45dad6e2b8d49ef8f8f99faa9cd3d3",
                "md5": "a1ae36a5c0b3f540fa401b66f9726a80",
                "sha256": "3a5eff69afc78c874afbf09c56acabd5a749b2067d1f6b98a42a5b856ac68347"
            },
            "downloads": -1,
            "filename": "nonebot_bison-0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a1ae36a5c0b3f540fa401b66f9726a80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.10",
            "size": 2281511,
            "upload_time": "2024-03-29T07:16:32",
            "upload_time_iso_8601": "2024-03-29T07:16:32.815230Z",
            "url": "https://files.pythonhosted.org/packages/6b/39/2f8297fe3ab7c3a734ac4f8dbd388c45dad6e2b8d49ef8f8f99faa9cd3d3/nonebot_bison-0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 07:16:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "felinae98",
    "github_project": "nonebot-bison",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "lcname": "nonebot-bison"
}
        
Elapsed time: 0.23038s