fix: fix post type error

This commit is contained in:
H3CoF6
2026-02-13 23:42:06 +08:00
parent 7bf57a1475
commit 0a2d98b406
2 changed files with 10 additions and 9 deletions

View File

@@ -105,6 +105,7 @@ def _parse_timeline_xml(xml_text: str, fallback_username: str) -> dict[str, Any]
if not xml_str:
return out
try:
root = ET.fromstring(xml_str)
except Exception:
@@ -1143,7 +1144,8 @@ async def get_sns_media(
avoid_picked: int = 0,
post_id: Optional[str] = None,
media_id: Optional[str] = None,
media_type: int = 2,
# media_type: int = 2,
post_type: int = 1,
pick: Optional[str] = None,
md5: Optional[str] = None,
url: Optional[str] = None,
@@ -1152,7 +1154,7 @@ async def get_sns_media(
wxid_dir = _resolve_account_wxid_dir(account_dir)
if wxid_dir and post_id and media_id:
deterministic_key = _generate_sns_cache_key(post_id, media_id, media_type)
deterministic_key = _generate_sns_cache_key(post_id, media_id, post_type)
exact_match_path = _resolve_sns_cached_image_path_by_cache_key(
wxid_dir=wxid_dir,