Whats the replacement for WebResponse.AllElements in PowerShell Core 6?

巧了我就是萌 提交于 2020-01-25 05:22:24

问题


I have to parse a html file (find div with class xyz and use the inner text).

That would be quit simple by using and filtering the WebResponse.AllElements collection. This member seems to be not available in PowerShell Core 6 (on a Mac).

On this platform, I get an BasicHtmlWebResponseObject as the return value of the Invoke-WebRequest $Url call which lags tis property.

I don't want to use any C# code or external libraries. What would be an maintainable way to get the same functionality as on the Windows PowerShell environment?

来源:https://stackoverflow.com/questions/54588922/whats-the-replacement-for-webresponse-allelements-in-powershell-core-6

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