Skip to main content

a nonebot2 plugin to help you search anime on bgm.tv and return some information to you

Project description

bangumi-search

:tada::tada::tada:助力你成为二次元婆罗门!:tada::tada::tada:

简介

本插件可以帮你搜索 bangumi上的条目,并且根据你选择的搜索结果给你发送该条目的侧边简介栏和收藏盒。

特色功能

bangumi-search是一款以漫研为目的开发的插件。

  • 使用playwright作为无头浏览器,支持异步,效率更高。
  • 使用re库对网页内容进行正则搜索,全面爬取条目链接。
  • 方便懒得去打开bangumi网站的人查询番剧的监督、制作公司、放送时间等。

安装

  • 推荐使用脚手架安装
pip install nonebot-plugin-bangumi-search

功能展示

  • 使用 /bgm 指令触发机器人。
  • 发送搜索内容和搜索类型,机器人会返回搜索结果。
  • 再发送想浏览的搜索结果的数字顺序,机器人会返回该条目的侧边简介栏和收藏盒等信息。

一些问题

  • 虽然做了debug措施,但是搜索结果为空的时候还是可能会继续进行流程。
  • bangumi网页的访问不稳定,虽然在代码中做了debug措施 await page.reload() ,但还是有概率经常访问不到。
  • 没有可以手动或者自动终止流程的命令。
  • 图片太长,容易刷屏。
  • 不能对搜索结果进行翻页。

特别感谢

因为本人是第一次上手写nonebot插件,以及涉及OOP、playwright、异步等等内容的项目,因此找了不少大佬们做好的插件,从中学到了很多。

  • NoneBot2:本插件实装的开发框架。
  • go-cqhttp:稳定完善的 CQHTTP 实现。
  • HarukaBot:网页截图的灵感来源。
  • miragetank:学习了关于bot事件响应器的部分。

支持

大家喜欢的话可以给这个项目点个star

有bug、意见和建议都欢迎提交 Issues

许可证

本项目使用 MIT 作为开源许可证。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot-plugin-bangumi-search-1.0.1.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file nonebot-plugin-bangumi-search-1.0.1.tar.gz.

File metadata

File hashes

Hashes for nonebot-plugin-bangumi-search-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd0d3a2d20111e095f6cdd42a8c856f0e9534d4fb0d717845cba8747d352f23d
MD5 90720489d33c5cea54733380bfc2ab45
BLAKE2b-256 acd3841ebbfa42713ecfea499cd5a295c8f8be182574877e8d45c0d19d41993e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page