Convert HTML Table (with no rowspan/colspan) to JSON using Python
ID | Vendor | Product |
---|---|---|
1 | Intel | Processor |
2 | AMD | GPU |
3 | Gigabyte | Mainboard |
[
{
"product": "Processor",
"vendor": "Intel",
"id": "1"
},
{
"product": "GPU",
"vendor": "AMD",
"id": "2"
},
{
"product": "Mainboard",
"vendor": "Gigabyte",
"id": "3"
}
]
1 | Intel | Processor |
2 | AMD | GPU |
3 | Gigabyte | Mainboard |
[
[
"1",
"Intel",
"Processor"
],
[
"2",
"AMD",
"GPU"
],
[
"3",
"Gigabyte",
"Mainboard"
]
]
[
{
"date": "13 Jul 2022",
"transaction description": "SOME WORKPLACESalary",
"debit/cheque": "",
"credit/deposit": "$3,509.30",
"balance": "OD $1,725.53"
},
{
"date": "12 Jul 2022",
"transaction description": "ATM DEPOSITCARD 1605",
"debit/cheque": "",
"credit/deposit": "$400.00",
"balance": "OD $5,234.83"
},
{
"date": "11 Jul 2022",
"transaction description": "Another TransactionAnother Transaction",
"debit/cheque": "",
"credit/deposit": "$104.00",
"balance": "OD $5,634.83"
},
{
"date": "11 Jul 2022",
"transaction description": "MB TRANSFERTO XX-XXXX-XXXXXXX-51",
"debit/cheque": "$4.50",
"credit/deposit": "",
"balance": "OD $5,738.83"
}
]
- Support for nested table
- Support for buggy HTML table (ie.
td
instead ofth
inthead
)