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
Post a Comment