import re


def _extract_id(subtitle_link):
    """
    Extracts the id of a subtitle link
    :param subtitle_link: The link to the subtitles
    :return: The id contained within the link
    """
    result = re.search(r'/download/+file/+(.*)/?$', subtitle_link, re.IGNORECASE)

    if result is None:
        return None

    return result.group(1)