def get_bitbucket_username(bitbucket_url):
    """
    This function extracts bit bucket username from bit bucket url.
    :param bitbucket_url: url - bit bucket url
    :return: string - username extracted from bit bucket url
    """
    location = bitbucket_url.find('bitbucket.org/')
    bitbucket_username = bitbucket_url[location + 14:]
    slash_location = bitbucket_username.find('/')
    if slash_location == -1:
        return bitbucket_username
    else:
        return bitbucket_username[:slash_location]