Update index.js
Browse files
index.js
CHANGED
|
@@ -524,11 +524,11 @@ try {
|
|
| 524 |
//if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' });
|
| 525 |
if (!ytdl.validateURL(url)) return res.json({ message: 'Invalid URL' });
|
| 526 |
let videoID = ytdl.getVideoID(url);
|
| 527 |
-
let dataInfo = await ytdl.getBasicInfo(videoID) || {};
|
| 528 |
-
|
| 529 |
|
| 530 |
let response = {
|
| 531 |
-
metadata:
|
| 532 |
//other: otherAPI || null
|
| 533 |
};
|
| 534 |
|
|
|
|
| 524 |
//if (!ytIdRegex.test(url)) return res.json({ message: 'Invalid URL' });
|
| 525 |
if (!ytdl.validateURL(url)) return res.json({ message: 'Invalid URL' });
|
| 526 |
let videoID = ytdl.getVideoID(url);
|
| 527 |
+
//let dataInfo = await ytdl.getBasicInfo(videoID) || {};
|
| 528 |
+
let otherAPI = await (await axios.get("https://line.1010diy.com/web/free-mp3-finder/detail?url="+url))?.data?.data ? await (await axios.get("https://line.1010diy.com/web/free-mp3-finder/detail?url="+url))?.data?.data : null
|
| 529 |
|
| 530 |
let response = {
|
| 531 |
+
metadata: otherAPI,
|
| 532 |
//other: otherAPI || null
|
| 533 |
};
|
| 534 |
|