1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-10-02 01:20:48 +08:00
parent 3e1ef431a7
commit 2ff2758fc8
7 changed files with 43 additions and 119 deletions

View File

@@ -16,7 +16,7 @@ async function fetchAll() {
for (let i = 0; i < songIds.length; i++) {
await global.checkIsExit();
const songId = songIds[i];
console.log(`${i}/${songIds.length} | lyric: ${songId} | ${global.statistics}`);
console.log(`${i}/${songIds.length} | lyric: ${songId}`);
try {
await fetch({ songId: songId });
} catch (err) {
@@ -29,7 +29,6 @@ async function fetchAll() {
// 获取歌词详情
async function fetch({ songId, debug = false }) {
var url = `https://music.163.com/api/song/lyric?id=${songId}&lv=1`;
try {
// var json = fs.readFileSync(path.join(__dirname, "../../temp", `lyric-${songId}.json`), 'utf8');
var json = await requestUtils.getApiResult(url);