node.js - ytdl-core getInfo() function -


so trying metainfo youtube url using ytdl in node.js here's code i'm trying working :

ytdl.getinfo('https://www.youtube.com/watch?v=yqhsxmglc9a',{downloadurl: true},   function(err, info) {     if (err) throw err;        console.log(info.title);   } ); 

so, works fine , title of song. i'm trying info in stocking in var me use later. , can't manage it, tried return callback methode or catching whatever getinfo() giving keep saying it's 'undefined'.

if of have ideas i'll glad try these.

thanks, lucas


Comments

Popular posts from this blog

r - geom_bar tied exactly to x and y axis (without aggregating) -

php - Is there a way to specify only some optional function args? -

java - Spring-boot using RestTemplate -