jxxghp
2024-05-10 20:26:58 +08:00
parent a9f1345ec1
commit 3dd1260993
2 changed files with 7 additions and 7 deletions

View File

@@ -27,11 +27,12 @@
"name": "站点数据统计",
"description": "自动统计和展示站点数据。",
"labels": "站点",
"version": "3.3",
"version": "3.4",
"icon": "statistic.png",
"author": "lightolly",
"level": 2,
"history": {
"v3.4": "修复馒头站点数据统计",
"v3.3": "支持选择仪表板组件规格",
"v3.2": "支持在仪表板中显示站点统计信息需要主程序升级至v1.8.7+版本",
"v3.1": "修复观众无法统计做总数和做种体积的bug",

View File

@@ -43,7 +43,7 @@ class SiteStatistic(_PluginBase):
# 插件图标
plugin_icon = "statistic.png"
# 插件版本
plugin_version = "3.3"
plugin_version = "3.4"
# 插件作者
plugin_author = "lightolly"
# 作者主页
@@ -1133,12 +1133,12 @@ class SiteStatistic(_PluginBase):
"""
构建站点信息
"""
site_cookie = site_info.get("cookie")
if not site_cookie:
return None
site_name = site_info.get("name")
site_cookie = site_info.get("cookie")
apikey = site_info.get("apikey")
token = site_info.get("token")
if not site_cookie and not apikey and not token:
return None
url = site_info.get("url")
proxy = site_info.get("proxy")
ua = site_info.get("ua")
@@ -1147,8 +1147,7 @@ class SiteStatistic(_PluginBase):
proxies = settings.PROXY if proxy else None
proxy_server = settings.PROXY_SERVER if proxy else None
render = site_info.get("render")
logger.debug(f"站点 {site_name} url={url} site_cookie={site_cookie} ua={ua}")
logger.debug(f"站点 {site_name} url={url}site_cookie={site_cookie}ua={ua}api_key={apikey}token={token}proxy={proxy}")
if render:
# 演染模式
html_text = PlaywrightHelper().get_page_source(url=url,