From 29fccd388758a1b5e19724e041f37517d2a09c14 Mon Sep 17 00:00:00 2001 From: InfinityPacer <160988576+InfinityPacer@users.noreply.github.com> Date: Mon, 13 Jan 2025 01:30:59 +0800 Subject: [PATCH] fix(site): update regex for unread message matching --- app/modules/indexer/parser/nexus_php.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/indexer/parser/nexus_php.py b/app/modules/indexer/parser/nexus_php.py index d83733df..35420096 100644 --- a/app/modules/indexer/parser/nexus_php.py +++ b/app/modules/indexer/parser/nexus_php.py @@ -43,7 +43,7 @@ class NexusPhpSiteUserInfo(SiteParserBase): message_text = message_labels[0].xpath("string(.)") logger.debug(f"{self._site_name} 消息原始信息 {message_text}") - message_unread_match = re.findall(r"[^Date](信息箱\s*|\(|你有\xa0)(\d+)", message_text) + message_unread_match = re.findall(r"[^Date](信息箱\s*|\((?![^)]*:)|你有\xa0)(\d+)", message_text) if message_unread_match and len(message_unread_match[-1]) == 2: self.message_unread = StringUtils.str_int(message_unread_match[-1][1])