1 2 3 4 5 6 7 8 |
$web = (Invoke-WebRequest 'http://www.bolsamadrid.es/esp/aspx/Empresas/FichaValor.aspx?ISIN=ES0148396007') $webhtml = $web.AllElements.where{$_.id -eq "ctl00_Contenido_tblPrecios"}.outerhtml $sinhtml = $webhtml.replace(".","").replace(",",".").replace("</th>",",</th>").replace("</td>",",</td>") -replace "<.*?>" $htmlsin = $sinhtml.trim() $sinespa = $htmlsin.replace(" ","") $concsv = $sinespa | ConvertFrom-Csv $concsv |