from bs4 import BeautifulSoup


def auth_check(content):
    """
    Parse films page to check authorization
    Args:
        content: raw html
    """
    access_error = """
    Ratings for this user cannot be accessed.
    Either auth cookie is incorrect or this user is not your friend
    """
    soup = BeautifulSoup(content, 'html.parser')
    no_rating_access = soup.find('div', attrs={'class': 'userVotesPage__limitedView'})
    assert not no_rating_access, access_error
    return True