def _get_document_number(self, row):
    "Return the document number for an item.\n\n        In district court attachment pages, this is easy to extract with an\n        XPath. In bankruptcy cases, it's simply not there.\n        "
    if self.is_bankruptcy:
        return None
    else:
        return int(row.xpath('.//a/text()')[0].strip())
Return the document number for an item.

In district court attachment pages, this is easy to extract with an
XPath. In bankruptcy cases, it's simply not there.
def _get_document_number(self, row):
    "Return the document number for an item.\n\n        In district court attachment pages, this is easy to extract with an\n        XPath. In bankruptcy cases, it's simply not there.\n        "
    if self.is_bankruptcy:
        return None
    else:
        return int(row.xpath('.//a/text()')[0].strip())