Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mussol_
Advocate II
Advocate II

NO REFRESH FROM WEB PAGE

Hello,

 

since a couple of weeks ago, the data I obtained from a web page returns an error, I tried this with several web origins with same result.

The error that appears is:

"We timed out waiting for the web page to load."

 

The URL is, for example: https://www.expansion.com/mercados/cotizaciones/indices/ibex35_I.IB.html

You can confirm that the web page can be loaded correctly from a web browser.

 

The code from Power Query is:

let
Origen = Web.BrowserContents("https://www.expansion.com/mercados/cotizaciones/indices/ibex35_I.IB.html"),
#"Tabla extraída a partir de HTML" = Html.Table(Origen, {{"Column1", "TABLE[id='listado_valores'] > * > TR > :nth-child(1)"}, {"Column2", "TABLE[id='listado_valores'] > * > TR > :nth-child(2)"}, {"Column3", "TABLE[id='listado_valores'] > * > TR > :nth-child(3)"}, {"Column4", "TABLE[id='listado_valores'] > * > TR > :nth-child(4)"}, {"Column5", "TABLE[id='listado_valores'] > * > TR > :nth-child(5)"}, {"Column6", "TABLE[id='listado_valores'] > * > TR > :nth-child(6)"}, {"Column7", "TABLE[id='listado_valores'] > * > TR > :nth-child(7)"}, {"Column8", "TABLE[id='listado_valores'] > * > TR > :nth-child(8)"}, {"Column9", "TABLE[id='listado_valores'] > * > TR > :nth-child(9)"}, {"Column10", "TABLE[id='listado_valores'] > * > TR > :nth-child(10)"}, {"Column11", "TABLE[id='listado_valores'] > * > TR > :nth-child(11)"}}, [RowSelector="TABLE[id='listado_valores'] > * > TR"]),
#"Encabezados promovidos" = Table.PromoteHeaders(#"Tabla extraída a partir de HTML", [PromoteAllScalars=true]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"Hora", type date}}),
#"Otras columnas quitadas" = Table.SelectColumns(#"Tipo cambiado",{"Valor", "Último", "Hora"}),
#"Columnas con nombre cambiado" = Table.RenameColumns(#"Otras columnas quitadas",{{"Valor", "Nombre"}, {"Último", "ULTIMO"}, {"Hora", "Fecha"}}),
#"Filas filtradas" = Table.SelectRows(#"Columnas con nombre cambiado", each ([Nombre] = "BANKINTER" or [Nombre] = "BBVA" or [Nombre] = "FLUIDRA" or [Nombre] = "IAG" or [Nombre] = "IBERDROLA" or [Nombre] = "REDEIA" or [Nombre] = "SANTANDER" or [Nombre] = "TELEFÓNICA")),
#"Valor reemplazado" = Table.ReplaceValue(#"Filas filtradas","REDEIA","R.E.C.",Replacer.ReplaceText,{"Nombre"}),
#"Valor reemplazado1" = Table.ReplaceValue(#"Valor reemplazado","SANTANDER","B.SANTANDER",Replacer.ReplaceText,{"Nombre"}),
#"Tipo cambiado1" = Table.TransformColumnTypes(#"Valor reemplazado1",{{"ULTIMO", type number}}),
#"Valor reemplazado2" = Table.ReplaceValue(#"Tipo cambiado1","TELEFÓNICA","TELEFONICA",Replacer.ReplaceText,{"Nombre"})
in
#"Valor reemplazado2"

 

Why it worked before and not now?

 

any suggestion?

 

Thanks a lot in advance!

 

Josep.

 

 

1 ACCEPTED SOLUTION
foodd
Super User
Super User

Hello @mussol_ .   The site connected without issue.  Your query processes cleanly until Column "Hora" in the 4th applied step

 

foodd_1-1696106101779.png

 

errored when trying to handle it as a type of Date.   Once the datatype was set to Text, the rest of the script

loaded without issue. 

 

foodd_0-1696105968479.png

 

View solution in original post

2 REPLIES 2
mussol_
Advocate II
Advocate II

It Works!!

Thanks a lot foodd!!

foodd
Super User
Super User

Hello @mussol_ .   The site connected without issue.  Your query processes cleanly until Column "Hora" in the 4th applied step

 

foodd_1-1696106101779.png

 

errored when trying to handle it as a type of Date.   Once the datatype was set to Text, the rest of the script

loaded without issue. 

 

foodd_0-1696105968479.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.