feat(github_parser): 添加GitHub仓库信息查询功能
- 新增github_parser插件,支持通过命令或自动解析链接查询GitHub仓库信息 - 添加github_repo.html模板用于渲染仓库信息图片 - 优化图片管理器支持高质量截图和CSS缩放 - 重构消息事件类权限常量定义方式 - 更新帮助页面样式为三列布局并优化响应式设计
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user