Try Beautiful Soup!
1) Be able to handle badly formed, or illegal, HTML,From the description:
as best as possible.
"It won't choke if you give it ill-formed markup: it'll just give you access to a correspondingly ill-formed data structure."
Can anyone direct me to something which could help me for this?
http://www.crummy.com/software/BeautifulSoup/
Hans Christian -- http://mail.python.org/mailman/listinfo/python-list