I am looking for a way to extract a filename and extension from a particular url using Python
lets say a URL looks as follows
picture_page = \"http://dis
os.path.splitext will help you extract the filename and extension once you have extracted the relevant string from the URL using urlparse:
os.path.splitext
urlparse
fName, ext = os.path.splitext('yourImage.jpg')