title: Youtube_dl : ERROR : YouTube said: Unable to extract video data
body: <p>I'm making a little graphic interface with Python 3 which should download a youtube video with its URL.
  I used the <code>youtube_dl</code> module for that.
  This is my code :</p>
  <pre><code>import youtube_dl # Youtube_dl is used for download the video
  
  ydl_opt = {&quot;outtmpl&quot; : &quot;/videos/%(title)s.%(ext)s&quot;, &quot;format&quot;: &quot;bestaudio/best&quot;} # Here we give some advanced settings. outtmpl is used to define the path of the video that we are going to download
  
  def operation(link):
      &quot;&quot;&quot;
      Start the download operation
      &quot;&quot;&quot;
      try:
          with youtube_dl.YoutubeDL(ydl_opt) as yd: # The method YoutubeDL() take one argument which is a dictionary for changing default settings
              video = yd.download([link]) # Start the download
          result.set(&quot;Your video has been downloaded !&quot;)
      except Exception:
          result.set(&quot;Sorry, we got an error.&quot;)
  
  operation(&quot;https://youtube.com/watch?v=...&quot;)
  
  </code></pre>
  <p>When I execute my code, I get this error:</p>
  <pre><code>ERROR: YouTube said: Unable to extract video data
  </code></pre>
  <p>I saw <a href="https://github.com/ytdl-org/youtube-dl/blob/d4f53af482cc47b0473a3576da7ad902bea4ac39/youtube_dl/extractor/youtube.py#L1831" rel="noreferrer">here</a> that it was because it doesn't find any video info, how can I resolve this problem?</p>