1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

小改动

This commit is contained in:
程序员小墨 2022-12-17 16:26:54 +08:00
parent 99a53fc759
commit 412f39f78e
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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) {