Skip to content
zhaoblakePublic

About

HTML table parser

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

getable

Test Package version Supported Python versions

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)

About

HTML table parser

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages