def check_html_warnings(html, parser=None):
    """Check html warnings

    :param html: str: raw html text
    :param parser: bs4.BeautifulSoup: html parser
    :raise VkPageWarningsError: in case of found warnings
    """
    if parser is None:
        parser = bs4.BeautifulSoup(html, 'html.parser')

    # Check warnings
    warnings = parser.find_all('div', {'class': 'service_msg_warning'})
    if warnings:
        raise VkPageWarningsError('; '.join([w.get_text() for w in warnings]))
    return True
Check html warnings

    :param html: str: raw html text
    :param parser: bs4.BeautifulSoup: html parser
    :raise VkPageWarningsError: in case of found warnings