in reply to Re^2: Parsing badly formed HTMLin thread Parsing badly formed HTML
HTML Tidy/HTML::TreeBuilder is a powerful combination in these cases.