0
網頁內容進行交互這是我投入的PowerShell:試圖解析,並使用PowerShell的
PS > $source = "http://www.bing.com/search?q=sqrt(2)"
PS > $result = Invoke-WebRequest $source
PS > $resultContainer = $result.ParsedHtml.GetElementById("results_container")
這是錯誤消息我回來:
The property 'ParsedHtml' cannot be found on this object. Verify that the property exists. At line:1 char:1 + $resultContainer = $result.ParsedHtml.GetElementById("results_contain ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
我應該補充說我在Mac的終端中使用了PowerShell。 –