• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Data from Web

This is god awful website to scrape data from.

At any rate, you need to use Developer tool in browser of your choice. And trace what requests are sent to API endpoint to fill the data.

Ex: https://www.coteur.com/includes/aja...rnee=3&periode=&type=&saison=&_=1622479688609

This will get you data for day 3. So by changing journee=3 to some other number, you should be able to get data for different day.

However, since data returned is in html and json combined... you will need to parse data further.

Ex: You will want to parse list into text. Then perform text manipulation on data to restructure data.
Code:
let
    Source = Json.Document(Web.Contents("https://www.coteur.com/includes/ajax/statistiques-champ.php?compet_id=6&journee=3&periode=&type=&saison=&_=1622479688609")),
    data = Source[data],
    #"Converted to Table" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Added Custom" = Table.AddColumn(#"Converted to Table", "Custom", each Text.Combine(List.Transform([Column1], each Text.From(_)),"#(lf)"))
in
    #"Added Custom"
 
Thank you Chihiro for your reply :),
Unfortunately, I don't know much about reading and coding in the source code of a web page.
Maybe it's the job of the VBA masters

But indeed, the extraction depends on how the site is built.

I saw this very interesting link with your answer which works perfectly and bravo.
I will try to find a less complicated site otherwise.

Have a nice evening
 
Back
Top