问题
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