collecting images from website in python 2.7 -


i'm not geting why syntax error here on line 17:

parsed[2] = image["src"] 

then on line 18 :

outpath = os.path.join(out_folder, filename) 

then 19 also:

urlretrieve(urlparse.urlunparse(parsed), outpath) 

this :

filename = image["src".spilit("/")[-1] 

should :

filename = image["src"].split("/")[-1]  ## spell corrected , square bracket added.  

Comments

Popular posts from this blog

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -