Ignoring parse errors with Html Agility Pack?

◇◆丶佛笑我妖孽 提交于 2019-12-11 07:27:46

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/6182404/ignoring-parse-errors-with-html-agility-pack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!