修复观众无法统计做总数和做种体积的bug

This commit is contained in:
falling
2024-05-07 22:30:00 +08:00
parent 0d51137a68
commit 6a30eede49
3 changed files with 20 additions and 0 deletions

View File

@@ -32,6 +32,7 @@
"author": "lightolly",
"level": 2,
"history": {
"v3.1": "修复观众无法统计做总数和做种体积的bug",
"v3.0": "适配馒头数据统计需要升级至v1.8.5+版本且在站点信息中维护好API Key",
"v2.9": "增强API安全性",
"v2.8": "修复馒头未读消息统计",

View File

@@ -26,6 +26,7 @@ class SiteSchema(Enum):
NexusProject = "NexusProject"
NexusRabbit = "NexusRabbit"
NexusHhanclub = "NexusHhanclub"
NexusAudiences = "NexusAudiences"
SmallHorse = "Small Horse"
Unit3d = "Unit3d"
TorrentLeech = "TorrentLeech"

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from urllib.parse import urljoin
from app.plugins.sitestatistic.siteuserinfo import SITE_BASE_ORDER, SiteSchema
from app.plugins.sitestatistic.siteuserinfo.nexus_php import NexusPhpSiteUserInfo
class NexusAudiencesSiteUserInfo(NexusPhpSiteUserInfo):
schema = SiteSchema.NexusAudiences
order = SITE_BASE_ORDER + 5
@classmethod
def match(cls, html_text: str) -> bool:
return 'audiences.me' in html_text
def _parse_seeding_pages(self):
self._torrent_seeding_headers = {"Referer": urljoin(self._base_url, self._user_detail_page)}
super()._parse_seeding_pages()