title: Using pytube and I keep receiving the error: yt is not defined
body: <p>I'm trying to relearn python after a long break and I can not manage to get this piece of code to work, no matter what I do.
  It just keeps telling me</p>
  <pre><code>  File &quot;/Users/fletch/PycharmProjects/untitled1/YT Download.py&quot;, line 18, in &lt;module&gt;
      mp4files = yt.filter('mp4')
  NameError: name 'yt' is not defined
  </code></pre>
  <p>The entire program looks like this</p>
  <pre><code>from pip._vendor.distlib.compat import raw_input
  import pytube
  
  # save path
  from pytube import YouTube
  
  SAVE_PATH = &quot;/Users/fletch/Movies&quot;
  
  # Get Video URL from User
  url = raw_input(&quot;Please input the link of the Video you want to download: \n&quot;.rstrip())
  
  try:
      yt = YouTube(url)
  except:
      print(&quot;Connection Error&quot;)
  
  # Filters Out MP4 Files
  mp4files = yt.filter('mp4')
  
  # Set File Name
  filename = raw_input(&quot;Please name your file: \n&quot;.rstrip())
  yt.set_filename(filename)
  
  # Get the Video
  d_video = yt.get(mp4files[-1].extension, mp4files[-1].resolution)
  try:
      d_video.download(SAVE_PATH)
  except:
      print(&quot;Unknown Error, Try Again Later&quot;)
  print(&quot;Task Complete&quot;)
  </code></pre>
  <p>Any help will be greatly appreciated</p>