1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-10-06 14:01:05 +08:00
parent 6c3a6d9aaf
commit 9db9383934
7 changed files with 117 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ const artistInfoUtils = require('./src/getInfo/artistInfoUtils');
const albumInfoUtils = require('./src/getInfo/albumInfoUtils');
const lyricInfoUtils = require('./src/getInfo/lyricInfoUtils');
const commentUtils = require('./src/getInfo/commentUtils');
// const playlistUtils = require('./src/getInfo/playlistUtils');
/**
* 测试
@@ -33,6 +34,7 @@ async function test() {
// 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({ songId: "2320041657", debug: true });
// let res = await albumInfoUtils.getFromDatabase({ albumId: "9156" });
// let res = await artistInfoUtils.getFromDatabase({ artistId: "12023508" });
@@ -111,6 +113,9 @@ async function watch() {
}, {
name: "commentTotalCount",
sql: `SELECT count(*) AS count FROM comment`,
}, {
name: "userCount",
sql: `SELECT count(*) AS count FROM user`,
}, {
name: "songAlbumCount",
sql: `SELECT count(*) AS count FROM song_album_relation`,
@@ -154,6 +159,7 @@ async function watch() {
`artist: ${newWatchParam['artistCount'] - oldWatchParam['artistCount']}`,
`lyric: ${newWatchParam['lyricCount'] - oldWatchParam['lyricCount']}`,
`comment: ${newWatchParam['commentCount'] - oldWatchParam['commentCount']}(song)/${newWatchParam['commentTotalCount'] - oldWatchParam['commentTotalCount']}(comment)`,
`user: ${newWatchParam['userCount'] - oldWatchParam['userCount']}`,
].join(', '),
`[已爬取]`,
[
@@ -162,6 +168,7 @@ async function watch() {
`artist: ${newWatchParam['artistCount']}`,
`lyric: ${newWatchParam['lyricCount']}`,
`comment: ${newWatchParam['commentCount']}(song)/${newWatchParam['commentTotalCount']}(comment)`,
`user: ${newWatchParam['userCount']}`,
].join(', '),
`[待爬取]`,
[
@@ -170,6 +177,7 @@ async function watch() {
`artist: ${newWatchParam['artistWaiting']}`,
`lyric: ${newWatchParam['songCount'] - newWatchParam['lyricCount']}`,
`comment: ${newWatchParam['songCount'] - newWatchParam['commentCount']}`,
`user: 未知`,
].join(', '),
`[总计] (已爬取 + 待爬取)`,
[
@@ -178,6 +186,7 @@ async function watch() {
`artist: ${newWatchParam['artistCount'] + newWatchParam['artistWaiting']}`,
`lyric: ${newWatchParam['songCount']}`,
`comment: ${newWatchParam['songCount']}`,
`user: ${newWatchParam['userCount']}`,
].join(', '),
`[关联关系统计]`,
`song-album: ${newWatchParam['songAlbumCount']}, song-artist: ${newWatchParam['songArtistCount']}`,