HtmlAgilityPack无法从某些网站解析

时间:2019-07-24 21:50:17

标签: c# winforms html-parsing html-agility-pack

我正在尝试使用HTMLAgilityPack解析网站列表中的数据,但是其中三个不起作用,节点始终返回null。我认为这可能是由于其DDoS保护所致,但老实说我毫无头绪。

网站是:https://www.badlion.net/https://hivemc.com/https://www.gommehd.net

HtmlWeb Web = new HtmlWeb();
HtmlAgilityPack.HtmlDocument document = Web.Load("https://www.badlion.net/forum/thread/228558");
string HTML=document.DocumentNode.SelectSingleNode("//p[@class='m_post__date']").InnerHtml;
//HTML=document.DocumentNode.SelectSingleNode("//div[@class='messageContent']").InnerHtml;
// (for the other two websites)

0 个答案:

没有答案
相关问题