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

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -