小编iSe*_*els的帖子

How to parse an HTML table with rowspans in Python?

The problem

I'm trying to parse an HTML table with rowspans in it, as in, I'm trying to parse my college schedule.

I'm running into the problem where if the last row contains a rowspan, the next row is missing a TD where the rowspan is now that TD that is missing.

I have no clue how to account for this and I hope to be able to parse this schedule.

What I tried

Pretty much everything I can think …

html python html-table beautifulsoup python-3.x

25
推荐指数
1
解决办法
1562
查看次数

标签 统计

beautifulsoup ×1

html ×1

html-table ×1

python ×1

python-3.x ×1