添加 assistant 助手;其他调整(大调整)
This commit is contained in:
@@ -75,17 +75,21 @@ async function startFetchDetail() {
|
||||
const threadId = idsToFetch[i];
|
||||
console.log(`getDetail\t| ${i + 1}/${idsToFetch.length} | threadId: ${threadId}`);
|
||||
await getDetail(threadId);
|
||||
await sleepUtils.sleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
async function getDetail(threadId) {
|
||||
|
||||
let url = `https://hifini.com/thread-${threadId}.htm`;
|
||||
|
||||
// let html = fs.readFileSync("./1.html", "utf8");
|
||||
let html = await getApiResult(url);
|
||||
// fs.writeFileSync("./1.html", html);
|
||||
let html;
|
||||
try {
|
||||
// html = fs.readFileSync("./1.html", "utf8");
|
||||
html = await getApiResult(url, { timeout: 3000 });
|
||||
// fs.writeFileSync("./1.html", html);
|
||||
} catch (e) {
|
||||
console.error("请求失败,可能是请求超时", e);
|
||||
return;
|
||||
}
|
||||
|
||||
// 解析到音乐信息
|
||||
var matcher = /var ap4 = new APlayer\(([\S\s]*?)\);/.exec(html);
|
||||
|
Reference in New Issue
Block a user