Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
YTDL-CORE is not downloading and even not getting video's info

I was working with ytdl-core. It was working fine but suddenly it stops working. It is behaving like something is wrong in code but I did not make any change in the code.

First it gives me the error as follows

download api called !
evalmachine.<anonymous>:24
c[72],c[6]),(0,c[85])(c[11]),(0,c[41])(c[39],c[28],(0,c[66])()),(0,c[78])(c[Math.pow(6,2)+122+-119],c[new Date("Wednesday December 31 1969 19:00:14 CDT")/1E3])}catch(d){(0<c[0]||(((0,c[80])(c[60],c[88]),c[80])(c[21],c[88]),0))&&(0,c[17])((0,c[70])(c[6]),c[78],c[88],c[12])}try{2<c[91]&&(1<c[53]?(0,c[17])((0,c[80])(c[82],c[6]),c[78],c[39],c[5]):((0,c[45])(c[49],c[88]),c[78])(c[88],c[86])),(0,c[17])((0,c[85])(c[31]),c[41],c[88],c[75],(0,c[35])())}catch(d){}};Wka(ncode);

SyntaxError: Missing catch or finally after try
at new Script (node:vm:100:7)
at exports.decipherFormats (/home/zorrain/Downloads/new/backend/node_modules/ytdl-core/lib/sig.js:116:51)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async exports.getInfo (/home/zorrain/Downloads/new/backend/node_modules/ytdl-core/lib/info.js:401:17)

Emitted 'error' event on PassThrough instance at: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.7.0

const downloadFile = async(url, filename, destination) => {
let isDownloadCancelled = false;
const downloader = new Downloader({
    url: url,
    directory: destination,
    fileName: filename,
    onProgress: function(percentage, chunk, remainingSize) {
        // console.log('% ', percentage);
        // console.log('Remaining bytes: ', remainingSize)
        if (remainingSize > downloadThreshold) {
            downloader.cancel();
            isDownloadCancelled = true;
        }
    }
})

console.log("Download started");
await downloader.download();
console.log("Download finished");

if (!isDownloadCancelled) {
    return destination + filename;
} else {
    return null;
}

}

But I don't even have try-catch in my code.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda