Azide

Results 31 issues of Azide

## 环境 - nonebot-bison 版本:0.7.3 - nonebot 版本:2.2.2 - 安装方式:(以下方式的一种或者其他方式) 1. 通过 nb-cli 安装 - 操作系统: Ubuntu20.04 ## 问题 最近发现B站的某些动态没有推送到群,查看nb日志发现请求的json中缺少需要的key`"topic_details"`导致解析失败 ## 日志 ``` File "/root/.cache/pypoetry/virtualenvs/nbb-2-cnPePOHF-py3.10/lib/python3.10/site-packages/nonebot_bison/scheduler/scheduler.py", line 96, in exec_fetch to_send...

resolve #155

Breaking

follow https://github.com/nonebot/nonebot2/pull/2641

目前 AllSupportedPlatformTarget 是一个泛型 https://github.com/MountainDash/nonebot-plugin-send-anything-anywhere/blob/cdd96b4b498bab6995151315f183bb3f81ddf8d1/nonebot_plugin_saa/registries/platform_send_target.py#L265-L279 无法做到判断 Platfrom.deserialize 结果为 AllSupportedPlatformTarget, 例如: https://github.com/MountainDash/nonebot-bison/blob/2fc6e253f3488cd6aa7a1f7b5e76b37297be2d04/nonebot_bison/config/subs_io/nbesf_model/v2.py#L36-L41 https://github.com/MountainDash/nonebot-bison/blob/2fc6e253f3488cd6aa7a1f7b5e76b37297be2d04/nonebot_bison/config/subs_io/subs_io.py#L43-L49 能否提供一个 ```python def is_supported_platform_target(target: PlatformTarget) -> TypeGuard[AllSupportedPlatformTarget]: ... ``` 工具来做到这件事

原请求头的森空岛版本 v1.0.1 过老已不能签到

**起因:** 在目前的签到流程中,每次签到都会进行令牌请求,这会在短时间内造成大量的API使用 ~(yj: 警觉)~,可能会导致服务器拒绝签到(只能说已经碰到了)。 ```plain 签到失败:Client error '400 Bad Request' for url 'https://as.hypergryph.com/user/oauth2/v2/grant' For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400 ``` 此外,目前没有机制来识别并重试由于这些特定错误导致的签到失败。 感觉是时候添加缓存机制来存储cred,以及对失败签到在一定时间后重试的功能了。 **方案:** 1. **签到时缓存cred:** 修改签到流程,将成功签到时获取的cred缓存到数据库。签到时优先使用缓存的cred,如果cred签到失败,则重新使用token请求新的cred并缓存。 2. **识别失败的签到:** 判定特定错误导致的签到失败,例如上文的`400 Bad Request`。通过分析签到过程中收到的响应,识别错误代码或错误信息等手段实现。...

enhancement

已知问题 - [ ] 无法拖拽设置窗口