14 Commits

Author SHA1 Message Date
32c237015f
♻️ 更新部分方法使用 scheduler_dict 进行cookie操作 2024-10-29 14:15:15 +08:00
8742de6cd1 在 cookie 中添加 cookie_name 字段 2024-09-23 10:29:56 +08:00
318ba8fb3c 🔀 merge 2024-09-09 18:41:01 +08:00
7901b845ea 初步实现携带cookie请求 2024-09-02 23:13:29 +08:00
cf38500be7 🐛 Rss 不再删除格式化字符 2024-09-01 22:23:02 +08:00
Cateon Huo
9e5dcb3912
实现 Post.content 相关扩展协议 (#553)
*  `post` 新增 `get_content()` 方法

* 🚨 make linter happy

* 💄 auto fix by pre-commit hooks

* 🐛 fix: 调整函数使用

* 💄 auto fix by pre-commit hooks

*  转用函数处理文本

* 💄 auto fix by pre-commit hooks

* 🔨 使用`Dict`存储`content_handlers`

* 💄 auto fix by pre-commit hooks

* 🎨 fix

* :arts: 简化函数使用

* 🐛 移除`Theme`的过时参数

* 🗑️ 复用 `self.plain_content`

* 💄 auto fix by pre-commit hooks

*  注册式装饰器写法

* 💄 auto fix by pre-commit hooks

* 🐛 fix

* 💄 auto fix by pre-commit hooks

* :feat: 通用纯文本处理函数

* 💄 auto fix by pre-commit hooks

* :downgrade: 复用`==`处理标题

* 🎨 简化(?)写法

*  测试修复

* ♻️ via ContentSupport extensions

* 🐛 fix test

* 💄 auto fix by pre-commit hooks

* 🐛 for clean text

* 🐛 fix

* 💄 auto fix by pre-commit hooks

* fix: for xml

* 💄 auto fix by pre-commit hooks

* chore: art

* 💄 auto fix by pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-04 18:39:12 +08:00
felinae98
5bd8b21f19 ♻️ rename scheduler_config -> site 2024-06-03 18:36:07 +08:00
felinae98
2fc11a9653 ♻️ refactor client of scheduler_config 2024-06-03 18:36:07 +08:00
Azide
f202071e9f 添加 Theme 功能 2024-02-16 09:46:13 +08:00
UKM
cfa91df5e4
🐞 fix(text-similarity): 修复除0报错 (#302)
* 🐞 fix(text-similarity): 修复除0报错

没有考虑到bilibili的推送出现动态或者视频简介长度为零的情况,出现文本相似度除0Error

* 🧪 test(bilibili): 添加视频动态内容为空的情况的测试

* 🧪 test(text-similarity): 增加文本相似度函数的测试

* Update test_rss.py

* 📃 docs(text_similarity): 添加文本相似度函数的注释

* 🦄 refactor(text_similarity): 重构文本相似度的比较方法

* 🎈 perf(similar_text): 将比较函数的return改成raise

* 🦄 refactor(text_similarity): 重构文本相似度比较方法

* Update nonebot_bison/platform/bilibili.py

Co-authored-by: felinae98 <731499577@qq.com>

* Update nonebot_bison/platform/rss.py

Co-authored-by: felinae98 <731499577@qq.com>

---------

Co-authored-by: felinae98 <731499577@qq.com>
2023-08-27 16:28:26 +08:00
Azide
fc699d80ce ⬆️ 升级dev工具依赖
💄 auto fix by pre-commit hooks
2023-07-18 21:43:25 +08:00
Azide
dba8f2a9cb 🎨 按ruff的检查调整程序代码 2023-07-18 21:43:25 +08:00
UKM
9838e25bad
🎈优化RSS推送的内容 (#259)
* 🧪 test(tests): 添加了RSS的单元测试

* 🎈 perf(rss and test): 优化了RSS部分源标题正文重复的问题

部分RSS源(RSSHub的Twitter)存在正文当标题用的情况,导致推送的时候呈现为两段重复的文字,现通过Jaccard相似系数来判断是否需要去重

* Update nonebot_bison/platform/rss.py

Co-authored-by: AzideCupric <57004769+AzideCupric@users.noreply.github.com>

* Update nonebot_bison/platform/rss.py

Co-authored-by: AzideCupric <57004769+AzideCupric@users.noreply.github.com>

* 🐞 fix(platform/rss): 修复了漏掉相似文本在后端位置的问题

* 🐞 fix(rss): 修正一些feed无法正确识别时间的bug

一些feed时间只有updated标签或者没有,原先的代码只能解析用published标签的时间

felinae98#275

* 🎈 perf(rss): 更改字符串相似度比较方法

从Jaccard相似系数比较相似度改为通过最长公共子序列来比较

* 🦄 refactor(rss): 重构实现字符串相似度比较的方法

使用标准库difflib代替原先手搓的LCS

* Update nonebot_bison/utils/__init__.py

Co-authored-by: felinae98 <731499577@qq.com>

* Update nonebot_bison/platform/rss.py

* Update nonebot_bison/platform/rss.py

---------

Co-authored-by: AzideCupric <57004769+AzideCupric@users.noreply.github.com>
Co-authored-by: felinae98 <731499577@qq.com>
2023-07-18 11:54:49 +08:00
uy/sun
90816796c7
🚚 修改 nonebot_bison 项目结构 (#211)
* 🎨 修改 nonebot_bison 目录位置

* auto fix by pre-commit hooks

* 🚚 fix frontend build target

* 🚚 use soft link

* Revert "🚚 use soft link"

This reverts commit de21f79d5ae1bd5515b04f42a4138cb25ddf3e62.

* 🚚 modify dockerfile

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: felinae98 <731499577@qq.com>
2023-03-09 17:32:51 +08:00