hi friends
i am a beginner in python programming. I have written code to download 16 pdf files. I am getting the pdf file but I am unable to open the file it is showing error. please help me.
import re,urllib
url="http://www.ncbi.nlm.nih.gov/books/NBK16"
id1=[30,24,25,28,22,23,14,33,21,29,16,27,18,20,17,26]
j=1;
for i in id1:
address= url+str(i)+'/pdf/ch'+str(j)+'.pdf'
print address
handle=urllib.urlretrieve(address,'ch'+str(j)+'.pdf')
print "HCV book ch"+str(j)+".pdf is succefully downloaded"
j+=1
----------