Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How do I download data from page source / button in url

JFD
6 - Meteoroid

Hi,

 

I have been using Alteryx only for a couple of weeks so I don't know all the tricks...yet 😉

 

I am trying to download data from a table in this url : https://unstats.un.org/unsd/methodology/m49/overview/

 

The data I need can be retrieved by clicking one of the button on the page. However, there does't seem to be a direct url to the excel file. One thing I found is that all the data is in the page source. Either way I can't figure out how to grab the data. I know I need to use the Download Tool but can't figure this one out.

 

Thx for the help!

7 REPLIES 7
fmvizcaino
17 - Castor
17 - Castor

Hi @JFD ,

 

From my little experience, by analyzing the website and tracing what is happening when clicking in the button, it seems not possible to achieve what you want with only a download tool if you want your data already parsed.

 

So, for that, I would use the python tool to press the button in your browser. I'm not a python developer, so I won't be capable of showing how to do it, but I can share an example from a search I've just done.

 

https://pythonspot.com/selenium-click-button/

 

Best,

Fernando Vizcaino

DiganP
Alteryx Alumni (Retired)

@JFD Yes you are correct, you can use the download tool to grab the data. You would have to parse out the data after the download tool. I used the text to columns tool to split the data. You can use the other tools to create logic to grab the data you want. 

 

Attached is an example to help you get started. Hope this helps. 

 

Using python, or the selenium package will also work as suggested by @fmvizcaino 

Digan
Alteryx
JFD
6 - Meteoroid

Thx a lot @DiganP

 

I was probably doing something wrong because when I was using the Download / Parse I was only getting 3k lines of data while now your workflow is giving 55k. I am guessing my delimiters were wrong.

 

Thx a lot @fmvizcaino I would have used python as I previously did a bit of Python but the company I am working for doesn't allow me in my current role.

pperrot1
7 - Meteor


@JFD 

 

How were you able to retrieve the file? I have tried @DiganP's workflow, but it did not work.

I'm also trying to get Alteryx to retrieve a file from a site (https://covid.saude.gov.br/) that requires clicking on a button to download.

 

If you used Python tool, can you be so kind to provide your workflow so that I can replicate??

JFD
6 - Meteoroid

Hi @pperrot1 

 

I did not use the Python tool. See attached what I am using.

 

Hope this helps!

pperrot1
7 - Meteor

@JFD 

Wow!! That is advanced!!
I'm in my first week of really using Alteryx.. I think it will take me months to get to I point that I could properly replicate something like that.

But I'm assuming you are extracting your data from the embedded table within that webpage, and not actually the download button, right??

JFD
6 - Meteoroid

You are correct, I get the data from the embedded table within that webpage, not the button.

 

Hope it helps!

Labels