I need one help. I need to download the file from remote source and storing it into local folder using Python. I am explaining my code below.
def downloadfile(request):
""" This function helps to download the file from remote site"""
if request.method == 'POST':
URL = request.POST.get('file') #i.e-http://koolfeedback.com/beta/about-us.php
filename = "status"
with open(filename,'wb') as fyl:
fyl.write(urllib2.urlopen(URL).read())
fyl.close()
Here I need to download the page and store into the local download
folder using zip
format.Please help me.