开发者

Ignoring parse errors with Html Agility Pack?

开发者 https://www.devze.com 2023-03-09 15:32 出处:网络
I\'m trying to parse out a single page from YouTube... Which isn\'t really free of syntax errors. Html Agility Pack screams about th开发者_运维百科ese errors, and returns nothing in result.

I'm trying to parse out a single page from YouTube... Which isn't really free of syntax errors. Html Agility Pack screams about th开发者_运维百科ese errors, and returns nothing in result.

http://codepaste.net/gh3hco


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消