mirror of
https://github.com/A-Minos/nonebot-plugin-tetris-stats.git
synced 2026-03-05 05:36:54 +08:00
* ➕ 添加依赖 yarl * ➕ 添加依赖 msgspec * ➖ 移除依赖 ujson * ♻️ 重构 request 使其支持分别设置代理 * ♻️ 重构 resource 接口 * ⚡️ 不再重复获取 Config * ♻️ 使用 yarl 替换 urllib.parse * ⚡️ 给 get_self_netloc 加个 cache * ✨ request 使用 proxy * ✨ 更新模板使用 proxy * 🐛 修复删除 ujson 依赖后 迁移脚本报错的bug
16 lines
357 B
Python
16 lines
357 B
Python
from re import compile
|
|
from typing import Literal
|
|
|
|
from yarl import URL
|
|
|
|
GAME_TYPE: Literal['TOS'] = 'TOS'
|
|
|
|
BASE_URL = {
|
|
URL('https://teatube.cn:8888/'),
|
|
URL('http://cafuuchino1.studio26f.org:19970'),
|
|
}
|
|
|
|
USER_NAME = compile(
|
|
r'^(?!\.)(?!com[0-9]$)(?!con$)(?!lpt[0-9]$)(?!nul$)(?!prn$)[^\-][^\+][^\|\*\?\\\s\!:<>/$"]*[^\.\|\*\?\\\s\!:<>/$"]+$'
|
|
)
|