def video_id(video_id_or_url):
    """
    Returns video id from given video id or url

    Parameters:
    -----------
    video_id_or_url: str - either a video id or url

    Returns:
    --------
    the video id
    """

    if 'watch?v=' in video_id_or_url:
        return video_id_or_url.split('watch?v=')[1]
    else:
        # assume we already have an video id
        return video_id_or_url