Powershell 如何从网页的源代码中仅提取extensions.swf完成的链接?

Powershell 如何从网页的源代码中仅提取extensions.swf完成的链接?,powershell,flash,Powershell,Flash,我想知道如何从网页的源代码中提取extensions.swf完成的链接,并将它们保存在文本文件中,以便以后下载 所以我有这个代码: $ie = new-object -ComObject InternetExplorer.Application $ie.Navigate2('http://www.addictinggames.com/car-games/moto-x3m-game.jsp') while($ie.Busy){} $ie.Document.links|select href 也许

我想知道如何从网页的源代码中提取extensions.swf完成的链接,并将它们保存在文本文件中,以便以后下载

所以我有这个代码:

$ie = new-object -ComObject InternetExplorer.Application
$ie.Navigate2('http://www.addictinggames.com/car-games/moto-x3m-game.jsp')
while($ie.Busy){}
$ie.Document.links|select href

也许是这样的

$ie.Document.body.innerHTML  |out-file c:\temp\source.html
$source =gc C:\temp\source.html
($source |Select-String "(\<(.)*\.swf)"  -AllMatches)[3]
$ie.Document.body.innerHTML |输出文件c:\temp\source.html
$source=gc C:\temp\source.html

($source | Select String“(\n你不能只做
| Select-Expand href | Where{$|-like“*.swf”}
?@TheMadTechnician不,我什么也得不到,因为,我想捕捉的是javascript而不是链接下的内容?那么有没有正确的解决方法?我尝试了你的建议,但什么都没有?我现在该怎么办?
$wc = New-Object net.webclient
$data = $wc.DownloadString('http://www.addictinggames.com/car-games/moto-x3m-game.jsp')
$rx = [regex]::Escape("com.mtvnet.games.GameSettings.Game.metadata.gameURL") + '\s*=\s*[\x27\x22]([^?]+)'
$link = [regex]::Match($data,$rx).groups[1].value
$link