From c2a05c260919f5196ace66772dec35fd65df5e31 Mon Sep 17 00:00:00 2001 From: Tim Showers Date: Mon, 10 Jun 2024 22:17:01 -0400 Subject: [PATCH] Add support to parseDataTable for headers containing links --- legistar/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legistar/base.py b/legistar/base.py index 77ae289..c9fa4a4 100644 --- a/legistar/base.py +++ b/legistar/base.py @@ -173,6 +173,8 @@ def parseDataTable(self, table): keys.append(text_content) elif len(inputs) > 0: keys.append(header.xpath('.//input')[0].value) + elif header.xpath(".//a"): + keys.append(header.xpath('.//a/text()')[0].replace(' ', ' ').strip()) else: keys.append(header.xpath('.//img')[0].get('alt'))