我试图解析以下网页:解析网页使用PowerShell
http://msdn.microsoft.com/en-us/library/ff647642.aspx
对于此行:
Offline catalog (Wsusscn2.cab). This is the offline catalog file. Download it from http://go.microsoft.com/fwlink/?LinkId=76054.
所以,我可以下载链接存在的文件。
但是,每当我做到以下几点:
$url = http://go.microsoft.com/fwlink/?LinkId=76054
$result = Invoke-WebRequest $url
$result.content | select-string "Wsusscn2.cab"
这只是返回页面上的所有内容。我如何解析链接?
[此Q/A](HTTP:/ /stackoverflow.com/questions/15859843/grab-image-links-from-html-website-using-powershell)可能是你在找什么。 – admdrew 2014-08-28 19:55:05
我不认为它是重复的,因为关键在于激活重定向。 – 2014-08-31 11:07:27