0

Is there someway I can parse badly written HTML code in python? I want to get some info from a web page which uses HTML tables for it's formatting and I found numerous flaws in the code using w3cs validator. can I parse this code in python?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by mahela007
0

The Beautifulsoup module can parse bad html. Also if you have beautifulsoup, you can use the lxml module to parse your bad html code.

0

thanks..Both useful posts because I use python 3 and I'm going to look around about beautiful soup. (For anyone else reading this thread, bad HTML code refers to badly constructed bode but this code displays well enough in firefox)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.