@staticmethod
def _get_page_count_from_tr(tr):
    'Take a row from the attachment table and return the page count as an\n        int extracted from the cell specified by index.\n        '
    pg_cnt_str_nodes = tr.xpath('./td[contains(., "page")]/text()')
    if (len(pg_cnt_str_nodes) == 0):
        return None
    else:
        for pg_cnt_str_node in pg_cnt_str_nodes:
            try:
                pg_cnt_str = pg_cnt_str_node.strip()
                return int(pg_cnt_str.split()[0])
            except ValueError:
                continue
Take a row from the attachment table and return the page count as an
int extracted from the cell specified by index.
@staticmethod
def _get_page_count_from_tr(tr):
    'Take a row from the attachment table and return the page count as an\n        int extracted from the cell specified by index.\n        '
    pg_cnt_str_nodes = tr.xpath('./td[contains(., "page")]/text()')
    if (len(pg_cnt_str_nodes) == 0):
        return None
    else:
        for pg_cnt_str_node in pg_cnt_str_nodes:
            try:
                pg_cnt_str = pg_cnt_str_node.strip()
                return int(pg_cnt_str.split()[0])
            except ValueError:
                continue