$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.Últ }
Mostrar el último precio de varias acciones del IBEX 35 (PowerShell, Mercados y cotizaciones, Automatización)
Except where otherwise noted, Jesusninoc by Jesús N. is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.