mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-23 15:09:42 +00:00
fix SiteStatistic
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"SiteStatistic": {
|
||||
"name": "站点数据统计",
|
||||
"description": "自动统计和展示站点数据。",
|
||||
"version": "2.4",
|
||||
"version": "2.5",
|
||||
"icon": "statistic.png",
|
||||
"author": "lightolly",
|
||||
"level": 2
|
||||
|
||||
@@ -43,7 +43,7 @@ class SiteStatistic(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "statistic.png"
|
||||
# 插件版本
|
||||
plugin_version = "2.4"
|
||||
plugin_version = "2.5"
|
||||
# 插件作者
|
||||
plugin_author = "lightolly"
|
||||
# 作者主页
|
||||
|
||||
@@ -322,7 +322,7 @@ class ISiteUserInfo(metaclass=ABCMeta):
|
||||
proxies=proxies,
|
||||
headers=req_headers).get_res(url=url)
|
||||
if res is not None and res.status_code in (200, 500, 403):
|
||||
if req_headers and "application/json" in req_headers.get("Accept"):
|
||||
if req_headers and "application/json" in str(req_headers.get("Accept")):
|
||||
return json.dumps(res.json())
|
||||
else:
|
||||
# 如果cloudflare 有防护,尝试使用浏览器仿真
|
||||
|
||||
Reference in New Issue
Block a user