def get_table_and_tdiv( standard: BeautifulSoup) -> Tuple[List[TableDictType], Tag]: all_tables = standard.find_all('div', class_='table') html_table = pl.find_tdiv_by_id(all_tables, TABLE_ID) list_table = attribute_table_to_list(html_table) table_dict_list = table_to_dict(list_table, COLUMN_TITLES) return (table_dict_list, html_table)
def get_attribute_table(standard: BeautifulSoup) -> List[TableDictType]: attr_dict_list: List[TableDictType] = [] all_tables = standard.find_all('div', class_='table') for table_id in ATTR_TABLE_IDS: html_table = pl.find_tdiv_by_id(all_tables, table_id) list_table = attribute_table_to_list(html_table) table_dict_list = table_to_dict(list_table, COLUMN_TITLES) attr_dict_list.extend(table_dict_list) return attr_dict_list
def get_table_rows_from_ids(standard: BeautifulSoup, table_ids: List[str], col_titles: List[str]) -> List[TableDictType]: table_dict_list: List[TableDictType] = [] all_tables = standard.find_all('div', class_='table') for table_id in table_ids: html_table = pl.find_tdiv_by_id(all_tables, table_id) table_list = table_to_list(html_table) table_dict = table_to_dict(table_list, col_titles) table_dict_list.extend(table_dict) return table_dict_list
def get_conf_profile_table(standard: BeautifulSoup) -> List[TableDictType]: all_tables = standard.find_all('div', class_='table') html_table = pl.find_tdiv_by_id(all_tables, TABLE_ID) list_table = attribute_table_to_list(html_table) return table_to_dict(list_table, COLUMN_TITLES, omit_empty=True)
def get_attribute_table(standard): all_tables = standard.find_all('div', class_='table') html_table = pl.find_tdiv_by_id(all_tables, ATTR_TABLE_ID) list_table = attribute_table_to_list(html_table) return table_to_dict(list_table, COLUMN_TITLES)