Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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.
Solved! Go to Solution.
Hello @mussol_ . The site connected without issue. Your query processes cleanly until Column "Hora" in the 4th applied step
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.
It Works!!
Thanks a lot foodd!!
Hello @mussol_ . The site connected without issue. Your query processes cleanly until Column "Hora" in the 4th applied step
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 65 | |
| 39 | |
| 33 | |
| 23 |