1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$acciones = "ES0148396007","ES0113900J37","ES0109067019","ES0105046009","ES0105066007","ES0130960018","ES0130670112","ES0118900010","ES0171996087","ES0177542018","ES0144580Y14","ES0169501022","ES0173516115","ES0165386014","ES0178430E18" foreach($accion in $acciones) { $web = (Invoke-WebRequest ('http://www.bolsamadrid.es/esp/aspx/Empresas/FichaValor.aspx?ISIN='+$accion)) $webhtml = $web.AllElements.where{$_.id -eq "ctl00_Contenido_tblPrecios"}.outerhtml $sinhtml = $webhtml.replace(".","").replace(",",".").replace("",",").replace("",",") -replace "<.*?>" $htmlsin = $sinhtml.trim() $sinespa = $htmlsin.replace(" ","") $concsv = $sinespa | ConvertFrom-Csv $web.ParsedHtml.title $concsv.Volumen } |
