Parse HTML table to a 2d-array-like data structure
Project description
getable
Parse HTML table to a 2d-array-like data structure.
Installation
pip install getable
Example
from getable import TableParser
html = """
<table id="table">
<thead>
<tr><th>Name</th><th>Age</th></tr>
</thead>
<tbody>
<tr><td>Alpha</td><td>10</td></tr>
<tr><td>Bravo</td><td>20</td></tr>
</tbody>
</table>
"""
parser = TableParser()
table = parser.parse(source=html, locator="#table")
for row in table:
for cell in row:
print(cell.text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
getable-0.1.3.tar.gz
(6.4 kB
view hashes)