fix m-team statistic

This commit is contained in:
jxxghp
2024-03-27 16:43:48 +08:00
parent 05b883b436
commit 2da89643ac
4 changed files with 7 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
"SiteStatistic": {
"name": "站点数据统计",
"description": "自动统计和展示站点数据。",
"version": "2.5",
"version": "2.6",
"icon": "statistic.png",
"author": "lightolly",
"level": 2

View File

@@ -43,7 +43,7 @@ class SiteStatistic(_PluginBase):
# 插件图标
plugin_icon = "statistic.png"
# 插件版本
plugin_version = "2.5"
plugin_version = "2.6"
# 插件作者
plugin_author = "lightolly"
# 作者主页

View File

@@ -290,8 +290,8 @@ class ISiteUserInfo(metaclass=ABCMeta):
req_headers.update({
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
})
if self._addition_headers:
req_headers.update(self._addition_headers)
if self._addition_headers:
req_headers.update(self._addition_headers)
if self.request_mode == "apikey":
# 使用apikey请求通过请求头传递

View File

@@ -68,7 +68,9 @@ class MTorrentSiteUserInfo(ISiteUserInfo):
domain = StringUtils.get_url_host(self.site_url)
self._torrent_seeding_headers = {
"Content-Type": "application/json",
"Accept": "application/json, text/plain, */*",
"Accept": "application/json, text/plain, */*"
}
self._addition_headers = {
"x-api-key": SystemConfigOper().get(f"site.{domain}.apikey"),
}