fix: 将平台业务ID统一改为String并自动建表

- 抖音、B站、快手、微博的帖子/视频/评论ID从BigInteger改为String,
  避免PostgreSQL下字符串写入BIGINT报错及未来ID溢出风险
- B站dynamic_id改为String,修复API返回id_str被强转int导致的精度丢失
- 知乎提取器对content_id/question_id显式str()转换
- main.py启动数据库保存模式时自动建表,无需手动--init_db
- 同步更新相关老化测试
This commit is contained in:
程序员阿江(Relakkes)
2026-07-01 23:03:43 +08:00
parent 51d4853db5
commit a06273ea6c
11 changed files with 55 additions and 61 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ async def update_xhs_note_comment(note_id: str, comment_item: Dict):
"nickname": mask_nickname(user_info.get("nickname")), # 用户昵称(已脱敏)
"sub_comment_count": comment_item.get("sub_comment_count", 0), # Sub-comment count
"pictures": ",".join(comment_pictures), # Comment pictures
"parent_comment_id": target_comment.get("id", 0), # Parent comment ID
"parent_comment_id": target_comment.get("id", ""), # Parent comment ID
"last_modify_ts": utils.get_current_timestamp(), # Last modification timestamp (Generated by MediaCrawler, mainly used to record the latest update time of a record in DB storage)
"like_count": comment_item.get("like_count", 0),
}