title: How would you automate downloading a file from a site everyday using python?
body: <p>How to automate the download a file from this page <a href="https://www.nseindia.com/products/content/equities/equities/homepage_eq.htm" rel="nofollow noreferrer">https://www.nseindia.com/products/content/equities/equities/homepage_eq.htm</a>, I tried it using python using urllib.</p>
  
  <pre><code>import urllib
  
  testfile = urllib.URLopener()
  testfile.retrieve("https://www.nseindia.com/products/content/historical/EQUITIES/2017/JUN?cm23JUN2017bhav.csv.zip8", "file.zip8")
  </code></pre>
  
  <p>Even that doesn't seem to work I don't know why but how do you go about downloading file from such a site with changing uri to files, just see pattern and add code like in the above case using <em>dates</em>? and why doesn't the above code work?</p>