title: How to use node-youtube-dl driver?
body: <p>I use <a href="https://github.com/fent/node-youtube-dl" rel="nofollow">youtube-dl node driver</a> to get information about videos on youtube, but I have trouble with ReferenceError - require is not defined (First line). I installed node-youtube-dl module on my laptop and the code is just taken from example in description. Is there anything else that I'm missing to do? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var youtubedl = require('youtube-dl');
  var url = 'https://www.youtube.com/watch?v=9Q7Vr3yQYWQ';
  
  ytdl.getInfo(url, function(err, info) {
    if (err) throw err;
  
    console.log('id:', info.id);
    console.log('title:', info.title);
    console.log('url:', info.url);
    console.log('thumbnail:', info.thumbnail);
    console.log('description:', info.description);
    console.log('filename:', info._filename);
    console.log('duration:', info.duration);
    console.log('format_id:', info.format_id);
  });</code></pre>
  </div>
  </div>
  </p>