import urllib2 f=urllib2.urlopen(raw_input("Please enter the URL:")) s=f.read() ff=open(raw_input("Please enter the filename:"),"w+") ff.write(s) ff.close()