feat(github_parser): 添加GitHub仓库信息查询功能

- 新增github_parser插件,支持通过命令或自动解析链接查询GitHub仓库信息
- 添加github_repo.html模板用于渲染仓库信息图片
- 优化图片管理器支持高质量截图和CSS缩放
- 重构消息事件类权限常量定义方式
- 更新帮助页面样式为三列布局并优化响应式设计
This commit is contained in:
2026-01-20 18:33:46 +08:00
parent 1ec066c9cb
commit 5f943c1792
6 changed files with 526 additions and 51 deletions

32
core/managers/1.py Normal file
View File

@@ -0,0 +1,32 @@
class 真鸭子:
def (self):
print("嘎嘎嘎")
def (self):
print("鸭子摇摇摆摆跑")
class 玩具鸭子:
def (self):
print("玩具鸭发出嘎嘎声")
def (self):
print("玩具鸭轮子咕噜噜跑")
class 小猫:
def (self):
print("喵喵喵")
def (self):
print("猫咪跑跑")
def 逗鸭子(鸭子一样的东西):
鸭子一样的东西.()
鸭子一样的东西.()
逗鸭子(真鸭子())
逗鸭子(玩具鸭子())
逗鸭子(小猫())
鸭子 = 1

View File

@@ -71,15 +71,21 @@ class ImageManager:
return None
try:
# 设置视口
await page.set_viewport_size({"width": 650, "height": 100})
width = 1920
height = 1080
await page.set_viewport_size({"width": width, "height": height})
# 加载内容
await page.set_content(html_content)
await page.wait_for_selector("body")
# 截图
screenshot_args = {'full_page': True, 'type': image_type}
screenshot_args = {
'full_page': True,
'type': image_type,
'omit_background': False,
'scale': 'css'
}
if image_type == 'jpeg':
screenshot_args['quality'] = quality