diff --git a/netease_music/sql/neteasemusic.sql b/netease_music/sql/neteasemusic.sql index 5bb8941..d87d421 100644 --- a/netease_music/sql/neteasemusic.sql +++ b/netease_music/sql/neteasemusic.sql @@ -11,7 +11,7 @@ Target Server Version : 80012 File Encoding : 65001 - Date: 09/11/2022 13:53:17 + Date: 09/11/2022 16:44:14 */ CREATE DATABASE `neteaseMusic` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci'; @@ -259,6 +259,7 @@ DROP TABLE IF EXISTS `song_playlist_relation`; CREATE TABLE `song_playlist_relation` ( `song_id` int(10) UNSIGNED NOT NULL COMMENT '歌曲id', `playlist_id` int(10) UNSIGNED NOT NULL COMMENT '歌单id', + `is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除', `alg` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保留字段', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', diff --git a/netease_music/sql/structure.sql b/netease_music/sql/structure.sql index 28e79dd..67ef2d4 100644 --- a/netease_music/sql/structure.sql +++ b/netease_music/sql/structure.sql @@ -105,6 +105,7 @@ CREATE TABLE `playlist` ( CREATE TABLE `song_playlist_relation` ( `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id', `playlist_id` int(10) unsigned NOT NULL COMMENT '歌单id', + `is_del` tinyint(4) NOT NULL DEFAULT 0 COMMENT '歌曲是否从歌单中删除 0-未删除 1-删除', `alg` varchar(20) DEFAULT NULL COMMENT '保留字段', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间', `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', diff --git a/netease_music/src/getInfo/playlistUtils_old.js b/netease_music/src/getInfo/playlistUtils_old.js index 6a84328..a7b16a7 100644 --- a/netease_music/src/getInfo/playlistUtils_old.js +++ b/netease_music/src/getInfo/playlistUtils_old.js @@ -12,7 +12,7 @@ const dbUtils = global.dbUtils; const { playlist_detail } = require('NeteaseCloudMusicApi'); const dataManager = require('../dataManager'); -async function fetchAll({ args }) { +async function fetchAll() { // 睡眠时间设置长一些,不然容易触发500错误 global.sleepTime = Math.max(1000, global.sleepTime); console.log("global.sleepTime", global.sleepTime); diff --git a/netease_music/src/index.js b/netease_music/src/index.js index 95c733d..3c12711 100644 --- a/netease_music/src/index.js +++ b/netease_music/src/index.js @@ -18,6 +18,7 @@ const artistInfoUtils = require('./getInfo/artistInfoUtils'); const albumInfoUtils = require('./getInfo/albumInfoUtils'); const lyricInfoUtils = require('./getInfo/lyricInfoUtils'); const commentUtils = require('./getInfo/commentUtils'); +const playlistUtilsOld = require('./getInfo/playlistUtils_old'); const playlistUtils = require('./getInfo/playlistUtils'); const assistantUtils = require('./assistantUtils'); @@ -32,12 +33,12 @@ async function test() { // 不是所有歌手都有个人主页 例如 https://music.163.com/#/artist?id=1079075 // let res = await songInfoUtils.fetchAll({ args: {} }); - // let res = await playlistUtils.fetchAll(); + // let res = await playlistUtilsOld.fetchAll(); // let res = await albumInfoUtils.fetch({ albumId: "9156", debug: true }); // let res = await artistInfoUtils.fetch({ artistId: "12023508" }); // let res = await songInfoUtils.fetch({ songId: "437608327" }); - // let res = await playlistUtils.fetch({ playlistId: "4980157066", debug: true }); + // let res = await playlistUtilsOld.fetch({ playlistId: "4980157066", debug: true }); // let res = await testUtils.fetch(); // let res = await albumInfoUtils.getFromDatabase({ albumId: "9156" });