编程语言
首页 > 编程语言> > C#System.NullReferenceException NSoup

C#System.NullReferenceException NSoup

作者:互联网

for (int x = 0; x < 50; x++)
{
    NSoupClient.Connect("https://steamcommunity.com/gid/" + x)
               .UserAgent("Firefox")
               .Timeout(10000)
               .Get();
}

这段代码将向我抛出此错误(当int为5时,它总是停止):

An unhandled exception of type ‘System.NullReferenceException’ occurred in NSoup.dll

enter image description here

解决方法:

似乎您不是唯一遇到问题的人-https://nsoup.codeplex.com/workitem/8

似乎是库本身的问题.

标签:jsoup,html-parsing,c
来源: https://codeday.me/bug/20191112/2024127.html