import re


def get_program_id(url):
    # type: (str) -> str
    """Attempts to extract a programme id from a given url"""
    search = re.search(r"programs=(\d+)", url)
    return search.group(1) if search else ""