Skip to content

Commit

Permalink
[html] cache the caption column
Browse files Browse the repository at this point in the history
  • Loading branch information
midichef committed Dec 1, 2023
1 parent 891f7aa commit 6ab0def
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/loaders/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class HtmlTablesSheet(IndexSheet):
Column('classes', getter=lambda col,row: row.html.attrib.get('class')),
Column('title', getter=lambda col,row: row.html.attrib.get('title')),
Column('aria_label', getter=lambda col,row: row.html.attrib.get('aria-label')),
Column('caption', getter=lambda col,row: row.html.xpath('normalize-space(./caption)') if row.html.xpath('./caption') else None),
Column('caption', getter=lambda col,row: row.html.xpath('normalize-space(./caption)') if row.html.xpath('./caption') else None, cache=True),
Column('summary', getter=lambda col,row: row.html.attrib.get('summary')),
]
def iterload(self):
Expand Down

0 comments on commit 6ab0def

Please sign in to comment.