Update index.js
Browse files
index.js
CHANGED
|
@@ -524,7 +524,7 @@ 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.
|
| 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 = {
|
|
|
|
| 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 = {
|