title: YouTube-DL Embeded Date After Option
body: <p>I am trying to use youtube-dl embedded in a script.
  I would like it to only download videos from a playlist after a certain date.
  But, none of the options I have tried work.
  I have tried dateafter and daterange.</p>
  
  <p>Here is what I currently have:</p>
  
  <pre><code>from __future__ import unicode_literals
  import youtube_dl
  from youtube_dl.utils import DateRange
  import os
  
  def prog_hook(d):
      if d['status'] == 'finished':
          path='/home/pi/.temp/Commute/'
          for filename in os.listdir(path):
              if os.path.isdir(os.path.join(path,filename)):
                  mvcmd = 'rsync -a --remove-source-files /home/pi/.temp/Commute/{}/ /home/pi/Commute/{}/'.format(filename, filename)
                  os.system(mvcmd)
                  delcmd = 'rm -r {}'.format(filename)
                  os.system(delcmd)
  
  daterange = DateRange('20180601')
  
  ydl_opts = {
      'format' :'bestaudio/best',
          'format' : 'mp4',
          'outtmpl' : '/home/pi/.temp/Commute/%(playlist)s/00%(playlist_index)s-%(title)s.%(ext)s',
          'download_archive' : '/home/pi/.temp/Commute/downloadedShows.txt',
          'ignoreerrors' : 'True',
          'restrictfilenames' : 'True',
          'daterange' : daterange,
          'progress_hooks' : [prog_hook],
          }
  
  with youtube_dl.YoutubeDL(ydl_opts) as ydl:
      try:
          link = ["https://www.youtube.com/playlist?list=PLBZb_61EqeJlvaIUzRne-vxEFhNDLvmga"]
          ydl.download(link)
      except:
          pass
  </code></pre>