23 Commits

Author SHA1 Message Date
Azide
32e3bcc022
🐛 修正项目的代码警告 (#614)
* 🐛 调整ruff的pytest警告

* 🐛 调整导入关系警告

* 🐛 删除奇怪无用的赋值和取值逻辑

*  不同测试部分所用变量应加以区分

* 🐛 subs_io model添加默认值

* 🐛 修完所有的 ruff PT001 警告

* 🔧 按ruff建议修改ruff配置

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-17 18:24:20 +08:00
Azide
af72b6c3d0
🐛 B站蹲饼修复 (#525)
*  使用新接口

* ♻️ 调整刷新逻辑

* 🐛 调整刷新逻辑

* ♻️ 将单个哔哩哔哩文件拆开

* 🐛 修修补补边界情况

*  添加UID:xxx匹配

*  调整测试中的导入

*  调整测试的断言

* 🐛 添加unicode字符的escape

*  不再主动刷新cookies

* 🔀 适配新版Site

* 🐛 解析live_rcmd中的json string

* 🚨 make ruff happy

* 🐛 调整并测试bilibili retry函数

*  修正测试

* ♻️ 按review意见调整

* ♻️ 清理一些遗留的复杂写法

* ♻️ 移出函数内的NameTuple

* 🔇 删除不必要的日志输出

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

* Update nonebot_bison/platform/bilibili/scheduler.py

* Update scheduler.py

---------

Co-authored-by: felinae98 <731499577@qq.com>
2024-06-17 13:24:04 +08:00
felinae98
2fc11a9653 ♻️ refactor client of scheduler_config 2024-06-03 18:36:07 +08:00
Azide
c96dd85b22
独立 bilibili-live 的 SchedConf (#473)
*  独立 bilibili-live 的 SchedConf

*  修正测试

*  bilibili和bilibili-live共用http_client

* 🐛 不在__init__中修改_client_refresh_time

*  将刷新浏览器变更为类方法

* ♻️ seperate BilibiliClient

Co-authored-by: felinea98 <me@felinae98.cn>

---------

Co-authored-by: felinea98 <me@felinae98.cn>
2024-03-19 10:27:37 +08:00
Azide
f202071e9f 添加 Theme 功能 2024-02-16 09:46:13 +08:00
felinae98
e7dcfdee50
提供批量 api 接口 (#290)
* 🚧 add batch api

* 🚧 support batch in scheduler

*  use batch api in bilibili-live

 patch platform_manager directly

 use batch api in bilibili-live

 patch platform_manager directly

* ♻️ refactor var name

* 🐛 fix test

* 🐛 fix scheduler

* 🐛 fix test
2023-08-29 21:12:42 +08:00
Azide
fc699d80ce ⬆️ 升级dev工具依赖
💄 auto fix by pre-commit hooks
2023-07-18 21:43:25 +08:00
Azide
7d4eb7785c 🎨 按ruff调整测试代码 2023-07-18 21:43:25 +08:00
Azide
4f7a3ebfbe 🐛 修复bililive订阅没有直播间的用户报错的问题 2023-07-17 20:29:12 +08:00
felinae98
4118329bb0 🚧 remove User type 2023-06-06 03:30:50 +08:00
AzideCupric
24b6d60d69
开播提醒推送的图片改为使用直播间封面 (#249)
*  为bilibili直播添加下播提醒,添加直播分区信息

🚸 开播提醒推送的图片改为使用直播间封面

* ♻️ 使用Enum

* 🐛 修复bilibili发送视频动态时不推送视频标题的问题

* 🎨 调整LiveAction的注释和jaccard函数代码位置

* 🚨 修改RawPost类型定义,优化bililive类型显示
2023-05-14 01:41:25 +08:00
felinae98
bd679914eb add context to log http error 2022-11-24 14:12:11 +08:00
AzideCupric
f6e7e95d1e fix(bilibili-live): 修正bilibili-live与bilibili-bangumi中过时的api
fix(bilibili-live): 修改另一个过时api

test(bilibili-live):调整bilibili-live测试文件

test(bilibili-bangumi):调整测试用的api
2022-11-23 20:56:52 +08:00
AzideCupric
e14fd5bfd7
更换哔哩哔哩直播使用的api,添加直播间标题修改时推送直播间的功能 (#128)
* feat(bililive):调整bililive所使用的api与推送消息内容

* feat(bililive):调整功能的实现细节

* test(bililive): 初步完善相关测试

* docs(bililive): 补充文档相关

* change(bililive): 将使用修改配置项以调整订阅的方式调整为使用category

* test(bililive): 调整测试,扩大测试范围

* change(bililive):调整Bilibili-live内部的代码实现

* test(bililive):修正测试

* delete(bililive):删除用来测试功能性的临时文件

* change(bililive): 调整代码
2022-10-19 23:49:02 +08:00
felinae98
74b5074f04
inject http client to scheduler 2022-10-16 20:48:14 +08:00
felinae98
5abf8fb2a0
Merge remote-tracking branch 'origin/main' into next 2022-10-07 17:25:18 +08:00
felinae98
88e3d4de12
fixup! feat: add temp client for bilibili
fix bug
2022-10-04 15:45:00 +08:00
felinae98
0a4fd60e7a
fixup! feat: add temp client for bilibili
fix bug
2022-10-04 15:45:00 +08:00
felinae98
5b74850715
finish bilibili-bangumi 2022-08-04 23:06:38 +08:00
pre-commit-ci[bot]
f89ae85dcc auto fix by pre-commit hooks 2022-05-26 03:11:06 +00:00
AzideCupric
9be070a578 修正test_bilibili_live的匹配文本 2022-05-26 11:00:03 +08:00
Azide
e375a000ee 简化单元测试步骤 2022-05-23 14:54:05 +08:00
Azide
63b72d9c5b 添加了bilibili直播的单元测试 2022-05-23 14:38:35 +08:00