Exemplo n.º 1
0
def find_tdiv_by_id(all_tables: List[Tag], table_id: str) -> Tag:
    '''
    Find a given table tag by its HTML ID
    '''
    matching_table = (lambda table: pr.table_id(table) == table_id)
    table_with_id = list(filter(matching_table, all_tables))
    return None if table_with_id == [] else table_with_id[0]
def get_short_standard_link(tdiv):
    return pl.SHORT_DICOM_URL_PREFIX + pl.table_parent_page(
        tdiv) + '.html#' + pr.table_id(tdiv)