NoneBot2 plugin for twitter
Project description
⚠ 插件暂不可用
因推特开启登录墙,该插件暂不可用
📖 介绍
订阅推送 twitter 推文
💿 安装
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-twitter
pdm
pdm add nonebot-plugin-twitter
poetry
poetry add nonebot-plugin-twitter
conda
conda install nonebot-plugin-twitter
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_twitter"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| twitter_website | 否 | 无 | 自定义website |
| twitter_proxy | 否 | 无 | proxy |
| twitter_qq | 否 | 2854196310 | 合并消息头像来源 |
| command_priority | 否 | 10 | 命令优先级 |
| twitter_htmlmode | 否 | false | 网页截图模式 |
| twitter_original | 否 | false | 使用x官网截图 |
| twitter_no_text | 否 | false | 开启媒体过滤后彻底不输出文字 |
| twitter_node | 否 | true | 使用合并转发消息发送 |
配置格式示例
# twitter
twitter_proxy="http://127.0.0.1:1090"
twitter_qq=2854196306
command_priority=10
# 使用截图纯图模式示例
twitter_htmlmode=true
twitter_original=false
twitter_no_text=true
twitter_node=false
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| 关注推主 | 无 | 否 | 群聊/私聊 | 关注,指令格式:“关注推主 <推主id> [r18] [媒体]” |
| 取关推主 | 无 | 否 | 群聊/私聊 | 取关切割 |
| 推主列表 | 无 | 否 | 群聊/私聊 | 展示列表 |
| 推文列表 | 无 | 否 | 群聊/私聊 | 展示最多5条时间线推文,指令格式:“推文列表 <推主id>” |
| 推文推送关闭 | 无 | 否 | 群聊/私聊 | 关闭推送 |
| 推文推送开启 | 无 | 否 | 群聊/私聊 | 开启推送 |
| 推文链接识别关闭 | 无 | 否 | 群聊 | 关闭链接识别 |
| 推文链接识别开启 | 无 | 否 | 群聊 | 开启链接识别 |
[] 为可选参数,
r18 : 开启r18推文推送
媒体 : 仅推送媒体消息
效果图
注意事项
2.消息为合并转发发送,存在延迟和发送失败的可能
3.新的0.1.0版本为破坏性更新:代理配置格式更改,关注列表需重新关注。
4.已知bug,视频无法发送(可能为gocq bug)
5.链接识别发送方式与配置文件配置有关
6.推文列表暂时仅在 网页截图模式 开启时支持
更新记录
2024.01.20 0.2.4
- 优化代理设置
- 添加链接识别功能
- 添加查看时间线截图功能
2024.01.14 0.2.3
- 修复内存溢出bug
- 修复代理未完全生效bug
2024.01.06 0.2.2
- 更新默认镜像站列表
- 调整文字输出,不再会输出评论区文字
- 调整合并转发消息内,图片的优先级(其实是上次更新内容,但忘写了)
- 调整自动切换镜像站(非指定website的情况下)
2024.01.01 0.2.0
- 增加截图模式
- 增加无文字的媒体过滤
- 增加非合并转发发送方式
- 调整缓存删除方式为每天早上删除(没什么用,现在发不出视频)
- 调整媒体图片输出不再会输出评论区他人的图片视频
- 优化了日志输出
- 还有什么有点忘了,一口气改到0点,祝大家2024新年快乐吧
2023.10.28 0.1.14
- 更新可用站点列表
2023.09.16 0.1.13
- 暂无更新,可在env配置文件中添加以下参数来解决不可用问题
# twitter
twitter_website="https://nitter.privacydev.net"
最近找工作忙,更新慢了请见谅
2023.07.28 0.1.13
- 修复bug
2023.07.25
- 优化推送消息发送方式
- 修复bug
2023.07.20
- 增加了仅媒体推送
- 修复了该插件与若干问题
2023.06.27
- 临时解决回复原推文时,无法推送全部推文的问题
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot-plugin-twitter-0.2.4.tar.gz.
File metadata
- Download URL: nonebot-plugin-twitter-0.2.4.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
066bf9083082978662c28c16f4e732c33317a5f1ac09183368ac741060f6d5d5
|
|
| MD5 |
94936a4a7e43fd726481de5c5ad12187
|
|
| BLAKE2b-256 |
c01cecdddc1f36ba92b6d93907beb407413c68fac1a29ede5d40c8226e111035
|
File details
Details for the file nonebot_plugin_twitter-0.2.4-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_twitter-0.2.4-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0465cc233b65654220f0ee05471794f5fa0c77d215deabde8ec2611fdcf8f3eb
|
|
| MD5 |
1cdb47fb770cd90acd1cecffcda34ebe
|
|
| BLAKE2b-256 |
7d8ad4115dff6187c09a46479497cebe3e77521e2d0086c56067a06d0a4327fa
|