gpt4 book ai didi

c# - 我正在寻找 .NET 的实际功能 Web 浏览器控件,也许是 C++ 库

转载 作者:太空狗 更新时间:2023-10-29 21:30:32 24 4
gpt4 key购买 nike

<分区>

我正在尝试模拟网络浏览器以执行 JavaScript 代码然后解析 DOM。 System.Windows.Forms.WebBrowser 对象没有提供我需要的功能。它让我设置 header ,但您不能设置代理或清除 cookie。嗯,你可以,但它并不理想,并且会扰乱 IE 的设置。

到目前为止,我一直在扩展调用 native Windows 功能的 WebBrowser 控件,但它实际上是一个叠加另一个的 hack。我可以弄乱代理并清除 cookie 等,但是这个控件有我提到的问题。

我发现了一个名为 WebKit .NET ( http://webkitdotnet.sourceforge.net/ ) 的东西,但我没有看到对设置代理或 cookie 操作的支持。

有人可以推荐一个 c++/.NET/任何库来做这个吗:

基本上告诉我需要做什么才能在 .NET 中获得与此类似的界面:

// this should probably pause the current thread for the max timeout, 
// throw an exception on failure or return null w/e, VAGUELY similar to this
string WebBrowserEmu::FetchBrowserParsedHtml(Uri url,
WebProxy p,
int timeoutSeconds,
byte[] headers,
byte[] postdata);
void WebBrowserEmu::ClearCookies();

我不对我的行为负责。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com