ilhamdev commited on
Commit
69b3985
·
verified ·
1 Parent(s): 7e021bd

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -4
index.js CHANGED
@@ -105,9 +105,9 @@ async function ytmp4(url, quality = 'highestvideo') {
105
  try {
106
  const ID = ytdl.getVideoID(url),
107
  data = await ytdl.getInfo('https://www.youtube.com/watch?v=' + ID)
108
- const videoStream = await ytdl(ID, { quality: 'highestvideo' });
109
  let buffer = await streamToBuffer(videoStream)
110
- let upload = await uploadBuffer(buffer)
111
  let format = ytdl.chooseFormat(data.formats, { quality: quality });
112
 
113
  if (format) {
@@ -122,7 +122,7 @@ async function ytmp4(url, quality = 'highestvideo') {
122
  quality: format.qualityLabel,
123
  thumb: data.videoDetails.thumbnails[0].url,
124
  dl_url: format.url,
125
- url_v2: upload,
126
  }
127
  } else {
128
  throw new Error('No suitable format found');
@@ -294,4 +294,4 @@ const app = express()
294
  res.json({ message: e });
295
  }
296
  })
297
- .listen(7860, () => console.log('App running on port 7860'));
 
105
  try {
106
  const ID = ytdl.getVideoID(url),
107
  data = await ytdl.getInfo('https://www.youtube.com/watch?v=' + ID)
108
+ /*const videoStream = await ytdl(ID, { quality: 'highestvideo' });
109
  let buffer = await streamToBuffer(videoStream)
110
+ let upload = await uploadBuffer(buffer)*/
111
  let format = ytdl.chooseFormat(data.formats, { quality: quality });
112
 
113
  if (format) {
 
122
  quality: format.qualityLabel,
123
  thumb: data.videoDetails.thumbnails[0].url,
124
  dl_url: format.url,
125
+ //url_v2: upload,
126
  }
127
  } else {
128
  throw new Error('No suitable format found');
 
294
  res.json({ message: e });
295
  }
296
  })
297
+ .listen(7860, () => console.log('App running on port 7860'));