(Dec-12-2018, 11:09 PM)Truman Wrote: If I understand well os.path.basename
is used to get the original name of the image, we can do without it,
Yes it was just to show that option.A tips get used to test stuff out interactive bye taking parts of code out,a better REPL like IPython or ptpython(what i use) also help.
>>> import os >>> >>> image_location = 'http://www.pythonscraping.com/sites/default/files/lrg_0.jpg' >>> os.path.basename(image_location) 'lrg_0.jpg' >>> >>> help(os.path.basename) Help on function basename in module ntpath: basename(p) Returns the final component of a pathname