我需要解析一个网站,但这个网站有 Windows 身份验证 (kerberos),我HttpRequester
通过了身份验证,但如何将身份验证传递给 AngleSharp?
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Credentials = new NetworkCredential("user", "pass");
req.CookieContainer = session;
之后,我不知道如何继续将会话传递给AngleSharp
连接:
var configuration = Configuration.Default.WithDefaultLoader().WithCookies();
var context = BrowsingContext.New(configuration);
await context.OpenAsync(WebsiteUrl);