HtmlAgilityPack LoadFromBrowser method not found

html-agility-pack

Question

I useHtmlAgilityPack 1.6.2 inside a.NET Core 2.0 Console software.HtmlWeb.Load function is effective, butLoadFromBrowser function cannot be used. A compiler error occurred. Since the testing code was taken directly from the instruction page, it ought to be accurate. Tell me how to utilize the API, please.

1
0
10/27/2017 7:34:04 PM

Expert Answer

The LoadFromBrowser technique needs the WinFormWebBrowser a job.

since there isn'tWebBrowser in .NET Core 2.0 This approach is not feasible.

In the future, this approach may be made accessible by swapping out theWebBrowser by an open source browser, but there isn't a short-term strategy in place for it yet.

EDIT: Respond to comment

Is there still no solution for this?

I haven't tried it, however certain packages, like https://www.nuget.org/packages/Selenium.WebDriver, provide web browser for.NET Standard.

So maybe it will work if you use this package to get the HTML and use it with HAP.

1
3/22/2018 1:22:59 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow