Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

power BI web content loop with refresh in service

Hi, Im stuck with a m ulti value web content call, I have try to follow the tutorial here : https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/#comment-3381

but with all my try, the table result is not dynamic from the context, here is my old version of the table, with query URL modify but the loop doesnt apply in the call.

let
Source = Web.Contents("https://www.chrono24.fr/audemarspiguet/index-1.htm?pageSize=30",
[Query = "www.chrono24.fr/audemarspiguet/index-"&Page&".htm?pageSize=30"]),
#"Table extraite à partir de code Html" = Html.Table(Source,
{{"Titre", ".text-sm.text-bold"},
{"Informations", ".text-sm.m-b-2"},
{"Prix", ".align-items-end .text-bold"},
{"Frais de port", ".text-sm.text-muted"},
{"Pays", ".text-uppercase"},
{"Type annonce", ".js-article-item-article-badge-wrapper"},
{"Type vendeur", ".article-item-seller-badge"},
{"Code Annonce", ".article-item-container a", each [Attributes][href]}},
[RowSelector=".js-article-item-article-badge-wrapper"]),
#"Type modifié" = Table.TransformColumnTypes(#"Table extraite à partir de code Html",{
{"Titre", type text},
{"Informations", type text},
{"Prix", type text},
{"Frais de port", type text},
{"Pays", type text},
{"Type annonce", type text},
{"Type vendeur", type text},
{"Code Annonce", type text}}),
#"URL Complète" = Table.AddColumn(#"Type modifié", "URL", each "https://www.chrono24.fr" & [Code Annonce]),
#"Type modifié1" = Table.TransformColumnTypes(#"URL Complète",{{"URL", type text}}),
#"Personnalisée ajoutée" = Table.AddColumn(#"Type modifié1", "Page", each Page),
#"Type modifié2" = Table.TransformColumnTypes(#"Personnalisée ajoutée",{{"Page", type text}})
in
#"Type modifié2"

 

Source = Web.Contents("https://www.chrono24.fr/audemarspiguet/index-1.htm?pageSize=30",
[Query = "www.chrono24.fr/audemarspiguet/index-"&Page&".htm?pageSize=30"]),

 

I think I miss something a the point.

Someone can help me to fix it ?

 

BR

Julien