from urllib.parse import urlparse
from os.path import splitext, basename
picture_page = (
    'http://distilleryimage2.instagram.com/da4ca3509a7b11e19e4a12313813ffc0_7.jpg'
    )
Python split url to find image name and extension