mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix: Audiences站点未读消息数解析错误
优先使用Audiences特有的解析逻辑(从"总数/未读数"格式提取真正的未读数), 仅在匹配不到时才fallback到NexusPHP基类的通用正则,避免基类将总消息数 误判为未读数导致发送大量错误通知。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
34ff80e26c
commit
f46488cb9c
@@ -17,13 +17,10 @@ class NexusAudiencesSiteUserInfo(NexusPhpSiteUserInfo):
|
|||||||
"""
|
"""
|
||||||
解析 Audiences 新版顶部用户栏中的未读消息数。
|
解析 Audiences 新版顶部用户栏中的未读消息数。
|
||||||
"""
|
"""
|
||||||
super()._parse_message_unread(html_text)
|
|
||||||
if self.message_unread:
|
|
||||||
return
|
|
||||||
|
|
||||||
html = etree.HTML(html_text)
|
html = etree.HTML(html_text)
|
||||||
try:
|
try:
|
||||||
if not StringUtils.is_valid_html_element(html):
|
if not StringUtils.is_valid_html_element(html):
|
||||||
|
super()._parse_message_unread(html_text)
|
||||||
return
|
return
|
||||||
|
|
||||||
message_tools = html.xpath(
|
message_tools = html.xpath(
|
||||||
@@ -42,6 +39,8 @@ class NexusAudiencesSiteUserInfo(NexusPhpSiteUserInfo):
|
|||||||
if html is not None:
|
if html is not None:
|
||||||
del html
|
del html
|
||||||
|
|
||||||
|
super()._parse_message_unread(html_text)
|
||||||
|
|
||||||
def _parse_message_unread_links(self, html_text: str, msg_links: list):
|
def _parse_message_unread_links(self, html_text: str, msg_links: list):
|
||||||
"""
|
"""
|
||||||
解析 Audiences 未读消息链接。
|
解析 Audiences 未读消息链接。
|
||||||
|
|||||||
Reference in New Issue
Block a user