Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages