fix(parser): guard invalid tnode seeding json response

This commit is contained in:
YuF-9468
2026-03-05 09:21:16 +08:00
parent cc41036c63
commit 19d879d3f6
+8 -1
View File
@@ -63,7 +63,14 @@ class TNodeSiteUserInfo(SiteParserBase):
""" """
解析用户做种信息 解析用户做种信息
""" """
seeding_info = json.loads(html_text) try:
seeding_info = json.loads(html_text)
except json.JSONDecodeError:
return None
if not isinstance(seeding_info, dict):
return None
if seeding_info.get("status") != 200: if seeding_info.get("status") != 200:
return None return None