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.2.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file getable-0.1.2.tar.gz
.
File metadata
- Download URL: getable-0.1.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f1f71cc5e9cf58d3273f960ee78ddfce88926d5288156ba991e3e1d2a4b629a |
|
MD5 | 50db6fc705da16ab4827a84d40e195ac |
|
BLAKE2b-256 | f230d1879261317675c15e007f3fc213b054ba805391256863ce940afe8109be |
File details
Details for the file getable-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: getable-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ebcc725d41e61b3d30772cb8b3e93acf793c07781b40a7a8cad0d41987b635 |
|
MD5 | 2255fbd8e191fa7712050ef013bc84af |
|
BLAKE2b-256 | 0e6226b9b471b6512466ddf31802f9b597ef32ee155ae219956bfdd020a057fc |