mast/tools/sis_authentication.py
def __get_number_of_students(page):
    """
    Searches for number of results at queried page
    :param page: queried page with results
    :return: number of students in the results
    """
    soup = BeautifulSoup(page.content, 'html.parser')

    content = soup.select('#page_div > b:nth-child(3)')
    for text in content:
        for part in text:
            return __get_number(part)

    content = soup.select('#content > table >  tr > td.info_text > ul > li')
    for text in content:
        for part in text:
            if ("Number of students who do not have the right to seek:" in part) or \
                    ("Počet studentů, které nemáte právo vyhledat:" in part):
                return __get_number(part)
    return 0

    Searches for number of results at queried page
    :param page: queried page with results
    :return: number of students in the results
    
Searches for number of results at queried page
Searches for number of results at queried page
def __get_number_of_students(page):
    soup = BeautifulSoup(page.content, 'html.parser')
    content = soup.select('#page_div > b:nth-child(3)')
    for text in content:
        for part in text:
            return __get_number(part)
    content = soup.select('#content > table >  tr > td.info_text > ul > li')
    for text in content:
        for part in text:
            if ("Number of students who do not have the right to seek:" in part) or \
                    ("Počet studentů, které nemáte právo vyhledat:" in part):
                return __get_number(part)
    return 0
def __get_number_of_students ( page ) : soup = BeautifulSoup ( page . content , 'html.parser' ) content = soup . select ( '#page_div > b:nth-child(3)' ) for text in content : for part in text : return __get_number ( part ) content = soup . select ( '#content > table >  tr > td.info_text > ul > li' ) for text in content : for part in text : if ( "Number of students who do not have the right to seek:" in part ) or ( "Počet studentů, které nemáte právo vyhledat:" in p rt : return __get_number ( part ) return 0
Searches for number of results at queried page
Searches for number of results at queried page
"""
    Searches for number of results at queried page
    :param page: queried page with results
    :return: number of students in the results
    """
number of students in the results
number of students in the results
page
queried page with results
queried page with results