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

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -