diff --git a/netease_music/src/getInfo/commentUtils.js b/netease_music/src/getInfo/commentUtils.js index bd9cf25..aaaeca6 100644 --- a/netease_music/src/getInfo/commentUtils.js +++ b/netease_music/src/getInfo/commentUtils.js @@ -157,7 +157,7 @@ function getCommitInfoForInsert(songId, comment, commentType) { parent_comment_id: comment.parentCommentId, user_id: comment.user ? comment.user.userId : null, song_id: songId, - content: comment.content, + content: comment.content || "", // 有些 comment 的 content 为 null time: comment.time, like_count: comment.likedCount, comment_type: commentType, // 评论类型 0-comments 1-hotComments 2-topComments diff --git a/netease_music/src/getInfo/songInfoUtils.js b/netease_music/src/getInfo/songInfoUtils.js index a3858b0..39487bf 100644 --- a/netease_music/src/getInfo/songInfoUtils.js +++ b/netease_music/src/getInfo/songInfoUtils.js @@ -24,10 +24,10 @@ async function fetchAll({ args = {} }) { await global.checkIsExit(); var subArray = songIds.slice(i * step, (i + 1) * step); console.log(`${i + 1}/${count} | song: ${fill(subArray[0], 10)}-${fill(subArray.slice(-1)[0], 10)} ${fill(`(${subArray.length})`, 6, ' ', true)} | ${args.min || "?"}-${args.max || "?"}`); - if (subArray.length < 800) { - console.log("小于800首歌,等待凑够800首歌下次一起爬取"); - return; - } + // if (subArray.length < 800) { + // console.log("小于800首歌,等待凑够800首歌下次一起爬取"); + // return; + // } try { await fetch({ songIdArray: subArray }); } catch (err) {