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

c++ - CPP, 'X' button listener -

.net - Bulk insert via Dapper is slower than inserting rows one-by-one -

shared memory - gstreamer shmsrc and shmsink with h264 data -