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 details)
Built Distribution
File details
Details for the file getable-0.1.3.tar.gz
.
File metadata
- Download URL: getable-0.1.3.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 | 168d89ba38261a8868f78c260873be98afddfe913c6e1fe718148eb44acb94fa |
|
MD5 | 9923b9636a9cb9f9271f97a058ef59f0 |
|
BLAKE2b-256 | 02a7b892121c8a8f11cad8722f4f690b05b4219a5cd2457c3f9690c3001e1c65 |
File details
Details for the file getable-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: getable-0.1.3-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 | f7762fc8bcc6bc159280da2fab8c5243a1029fa4715d652a8a8c0902e2c639c2 |
|
MD5 | 4b22217e11acd50af4aaeacefa4c2ebe |
|
BLAKE2b-256 | e8cd14d3f5eb0b37aeed28db33a106e19569ccaf123773dad3949db86c1ee6d4 |