import re


def get_insta_shortcode(url: str) -> str:
    """
    Return shortcode of post from instagram URL
    :param url: URL
    :return: shortcode of post
    """
    shortcode = re.findall(
        r"(?:(?:http|https):\/\/)?(?:www.)?(?:instagram.com|instagr.am)\/p\/([A-Za-z0-9-_.]+)",
        url,
    )[0]

    return shortcode