mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
chore: add warning logs for invalid tnode seeding payload
This commit is contained in:
@@ -3,6 +3,7 @@ import json
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
from app.log import logger
|
||||
from app.modules.indexer.parser import SiteParserBase, SiteSchema
|
||||
from app.utils.string import StringUtils
|
||||
|
||||
@@ -65,10 +66,12 @@ class TNodeSiteUserInfo(SiteParserBase):
|
||||
"""
|
||||
try:
|
||||
seeding_info = json.loads(html_text)
|
||||
except json.JSONDecodeError:
|
||||
except json.JSONDecodeError as e:
|
||||
logger.warning(f"{self._site_name}: Failed to decode seeding info JSON: {e}")
|
||||
return None
|
||||
|
||||
if not isinstance(seeding_info, dict):
|
||||
logger.warning(f"{self._site_name}: Seeding info payload is not a dictionary")
|
||||
return None
|
||||
|
||||
if seeding_info.get("status") != 200:
|
||||
|
||||
Reference in New Issue
Block a user