const fs = require('fs'); const path = require('path'); const requestUtils = require('../utils/requestUtils'); const TEMP_MODULE_PATH = path.join(__dirname, 'temp'); const DATA_PATH = path.join(__dirname, 'data'); /** * 获取 html */ async function getHtml(url) { // let html = fs.readFileSync("songlist"); let html = await requestUtils.getApiResult(url, { gzip: true, }); return html; } /** * 正则匹配出JSON */ function getData(html, index = 0) { // 首先匹配出 window.__NUXT__ let script = /