def are_same_endpoint(first, second):
    """Equivalence check of two urls, stripped of query parameters"""
    def strip(url):
        return url.replace('www.', '').split('?')[0]
    return strip(first) == strip(second)