小改动
This commit is contained in:
		@@ -157,7 +157,7 @@ function getCommitInfoForInsert(songId, comment, commentType) {
 | 
				
			|||||||
        parent_comment_id: comment.parentCommentId,
 | 
					        parent_comment_id: comment.parentCommentId,
 | 
				
			||||||
        user_id: comment.user ? comment.user.userId : null,
 | 
					        user_id: comment.user ? comment.user.userId : null,
 | 
				
			||||||
        song_id: songId,
 | 
					        song_id: songId,
 | 
				
			||||||
        content: comment.content,
 | 
					        content: comment.content || "", // 有些 comment 的 content 为 null
 | 
				
			||||||
        time: comment.time,
 | 
					        time: comment.time,
 | 
				
			||||||
        like_count: comment.likedCount,
 | 
					        like_count: comment.likedCount,
 | 
				
			||||||
        comment_type: commentType, // 评论类型 0-comments 1-hotComments 2-topComments
 | 
					        comment_type: commentType, // 评论类型 0-comments 1-hotComments 2-topComments
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,10 +24,10 @@ async function fetchAll({ args = {} }) {
 | 
				
			|||||||
        await global.checkIsExit();
 | 
					        await global.checkIsExit();
 | 
				
			||||||
        var subArray = songIds.slice(i * step, (i + 1) * step);
 | 
					        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 || "?"}`);
 | 
					        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) {
 | 
					        // if (subArray.length < 800) {
 | 
				
			||||||
            console.log("小于800首歌,等待凑够800首歌下次一起爬取");
 | 
					        //     console.log("小于800首歌,等待凑够800首歌下次一起爬取");
 | 
				
			||||||
            return;
 | 
					        //     return;
 | 
				
			||||||
        }
 | 
					        // }
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            await fetch({ songIdArray: subArray });
 | 
					            await fetch({ songIdArray: subArray });
 | 
				
			||||||
        } catch (err) {
 | 
					        } catch (err) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user