$ie = new-object -com "InternetExplorer.Application" $ie.navigate("http://www.news.baidu.com/") $ie.visible = $true sleep -milliseconds 2500 $ID = $ie.Document.getElementById(‘focus-top‘) $ID1 = $ID.getElementsByTagName(‘li‘) $ID2 = $ID1 | where {$_.className -contains "hdline0"} $ID2.innerText
时间: 2024-10-13 10:41:37