码迷,mamicode.com
首页 > 其他好文 > 详细

get_hotnews_no1_from_baidu

时间:2014-12-14 07:12:52      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:powershell

$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


get_hotnews_no1_from_baidu

标签:powershell

原文地址:http://6124856.blog.51cto.com/6114856/1589632

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!