Ignoring parse errors with Html Agility Pack?

c# html html-agility-pack pack

Question

I'm trying to parse out a single page from YouTube... Which isn't really free of syntax errors. Html Agility Pack screams about these errors, and returns nothing in result.

http://codepaste.net/gh3hco

Popular Answer

I haven't tried this, but based on a suggestion in their forum you can use HTML Tidy or Tidy.NET to clean the HTML first. Optionally, you could find the erroneous tags and remove them in a pre-process step.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why