How to parse html in Powershell Core

不羁的心 提交于 2019-12-22 11:16:11

问题


So, Invoke-WebRequest in Powershell Core is permanently baked with -UseBasicParsing. More details can be found here and here.

Net result - no ParsedHtml property on the result object.

While the rationale makes perfect sense, the question is - how to parse HTML in Powershell Core?

Now, I can probably use a .NET Core library, like HtmlAgilityPack, but it seems like vast code changes would be required to migrate existing PS code to use this library.

Is this our best option or are there any better ones for PS Core users?

来源:https://stackoverflow.com/questions/56777597/how-to-parse-html-in-powershell-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!