title: Issues with basic embedding of youtube_dl into a Python 3.4 script
body: <p>I have been tinkering with <a href="https://github.com/rg3/youtube-dl" rel="nofollow">youtube_dl</a> and have been having issues implementing it into my Python 3.4 script.</p>
  
  <p>I am simply trying to create a variable that stores the output (adjusted with a few options.)</p>
  
  <p>However, I can't seem to figure out how to add the options to the function and the output seems to only be printed no matter what I do (as opposed to be stored in my variable.)</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>class MyLogger(object):
      def debug(self, msg):
          pass
  
      def warning(self, msg):
          pass
  
      def error(self, msg):
          print(msg)
  
  ydl_opts = {
  'logger': MyLogger(),
  }
  
  with youtube_dl.YoutubeDL(ydl_opts) as ydl:
      ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])
  </code></pre>
  
  <p>Which just downloads a test video currently. Here is the GitHub links that explain embedding youtube_dl:</p>
  
  <ul>
  <li><a href="https://github.com/rg3/youtube-dl#embedding-youtube-dl" rel="nofollow">Embedding youtube_dl</a></li>
  <li><a href="https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L121-L269" rel="nofollow">Embedding options</a></li>
  </ul>
  
  <p>And here is the pseudo-code of what I am trying to do:</p>
  
  <pre><code>class MyLogger(object):
      def debug(self, msg):
          pass
  
      def warning(self, msg):
          pass
  
      def error(self, msg):
          print(msg)
  
  ydl_opts = {
  'logger': MyLogger(),
  'InfoExtractors':[{'simulate','forceduration'}]
  }
  
  with youtube_dl.YoutubeDL(ydl_opts) as ydl:
      duration = ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])
  print('The duration is {0}'.format(duration))
  </code></pre>
  
  <p>Does anyone have any advice or ideas? I have been stuck on this issue for longer than I would care to admit.</p>