mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
modify banner data format
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ router.get("/", (req, res) => {
|
||||
try {
|
||||
const pattern = /<script[^>]*>\s*window\.Gbanners\s*=\s*([^;]+?);\s*<\/script>/g;
|
||||
const banners = pattern.exec(body)[1];
|
||||
res.send(JSON.stringify(eval(banners)));
|
||||
res.send(JSON.stringify(eval(`({code:200,banners:${banners}})`)));
|
||||
} catch (error) {
|
||||
res.status(502).send("fetch error");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user