PowerShell 脚本读取 rss 新闻
Windows 7 中的PowerShell 脚本很强大,可以直接使用COM组件和.Net类。下面是语音播报热点新闻。
$sapi = New-Object -Com Sapi.SpVoice $WebClient = New-Object System.Net.WebClient #$WebClient.Encoding=[System.Text.Encoding]::GBK $rss = [XML]($WebClient.DownloadString("http://news.163.com/special/00011K6L/rss_newstop.xml")) foreach($item in $rss.rss.channel.Item){ $title = $item.title.InnerText $content = $item.description.InnerText.Replace(" ","") $title $sapi.Speak($title) $content $sapi.Speak($content + " ") }
相关推荐
wanxuncpx 2020-06-01
malachuan 2020-05-17
IT前沿 2020-04-25
Vikingsoft 2020-04-23
晚安假行僧 2020-02-09
malachuan 2019-11-11
徐汇业大信息中心 2011-09-25
xiaomingqing 2015-06-29
chennai0 2015-07-22
panpanhappy 2019-07-15
iComputer 2019-09-05
川大门口贴膜小哥 2018-09-18
Vikingsoft 2018-08-18
IT前沿 2014-06-03
panpanhappy 2011-04-17
IT前沿 2013-08-27
灬扫地僧 2013-05-17