1 2 3 4 5 6 7 8 9 |
#Cotización del mismo día $fechamismodia=(Get-Date -Format dd/MM/yyyy) $fechamismodia;((((((Invoke-WebRequest 'http://www.bolsamadrid.es/esp/aspx/Empresas/FichaValor.aspx?ISIN=ES0148396007').AllElements).where{$_.Class -eq "TblPort"}).innerHTML | Select-String $fechamismodia) -split '[\r\n]' | Select-String $fechamismodia) -replace "<td>","*" -replace "<.*?>").split('*')[3] #Cotización del día anterior $fechaundiamenos=(Get-Date).AddDays(-1).ToString("dd/MM/yyyy") $fechaundiamenos;((((((Invoke-WebRequest 'http://www.bolsamadrid.es/esp/aspx/Empresas/FichaValor.aspx?ISIN=ES0148396007').AllElements).where{$_.Class -eq "TblPort"}).innerHTML | Select-String $fechaundiamenos) -split '[\r\n]' | Select-String $fechaundiamenos) -replace "<td>","*" -replace "<.*?>").split('*')[3] #Cotización de hace dos días $fechadosdiasmenos=(Get-Date).AddDays(-2).ToString("dd/MM/yyyy") $fechadosdiasmenos;((((((Invoke-WebRequest 'http://www.bolsamadrid.es/esp/aspx/Empresas/FichaValor.aspx?ISIN=ES0148396007').AllElements).where{$_.Class -eq "TblPort"}).innerHTML | Select-String $fechadosdiasmenos) -split '[\r\n]' | Select-String $fechadosdiasmenos) -replace "<td>","*" -replace "<.*?>").split('*')[3] |