?.兼容node v12.13.1
This commit is contained in:
parent
7afc7f79e2
commit
2ccb0e3c1f
@ -195,7 +195,7 @@ async function fetch({ songId, debug = false }) {
|
||||
console.log(`comment: ${songId} 结束了`);
|
||||
progress.currentStatus = 2; // 0-等待爬取/增量爬取 1-爬取中 2-完成
|
||||
if (progress.maxTime == 0) { // 第一次爬取 且 没有分页的情况
|
||||
progress.maxTime = comments[0]?.time || 0;
|
||||
progress.maxTime = comments[0] ? (comments[0].time || 0) : 0;
|
||||
}
|
||||
progress.minTime = progress.maxTime; // minTime = maxTime 代表这一轮爬取完成了
|
||||
progress.currentTime = progress.maxTime; // 可有可无
|
||||
@ -219,7 +219,7 @@ function getCommitInfoForInsert(songId, comment, commentType) {
|
||||
return {
|
||||
comment_id: comment.commentId,
|
||||
parent_comment_id: comment.parentCommentId,
|
||||
user_id: comment.user?.userId,
|
||||
user_id: comment.user ? comment.user.userId : null,
|
||||
song_id: songId,
|
||||
content: comment.content,
|
||||
time: comment.time,
|
||||
|
Loading…
Reference in New Issue
Block a user