Alteryx Designer Desktop Discussions

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

Download Latest Zip File from a website with login credentials

raghusrealm
8 - Asteroid

I am looking for help to download the latest zip file from below website which requires login credentials to download the zip files. 

 

Below are the steps I am trying to achieve:

 

1. Login this URL: https://dea.ntis.gov/zips/weekly.html

2. Click on the latest Zip file 

3. A popup window comes up asking for login id and password to download the file

4. enter the login details 

5. download the zip file to defined output folder

6. unzip and extract the file to defined output folder

 

if anyone could help, it will be very helpful.

 

Regards,
Raghu

6 REPLIES 6
DavidP
17 - Castor
17 - Castor

The 1st thing I would try is whether you can embed the username and password in the request for a specific file

 

So, set the URL as https://dea.ntis.gov/deadata/zipweekly/WA200316.zip

 

And enter the username and password in the download tool.

 

If you can get this to work, we can look at how to webscrape the latest file.

 

 

DavidP_0-1594811140744.png

 

raghusrealm
8 - Asteroid

@DavidP 

 

Yes, it is working.

 

I attached the updated workflow here.

 

please suggest further steps.

 

Regards,

Raghu 

DavidP
17 - Castor
17 - Castor

See updated workflow attached. I've added some documentation to show what every part does. Essentially, you have to isolate the zip links from the main page, turn them into URLs and pick the latest one to download.

 

It seems the latest one is top of the list, but I  extracted the date as well in case you have to filter on date to find the latest one. 

 

You can then download the file by using the new URL and your login credentials.

 

DavidP_0-1594820563222.png

 

raghusrealm
8 - Asteroid

@DavidP 

 

Thanks for the workflow.

 

I am new to Alteryx so I am a bit confused as to where is the file getting saved and how do I extract the zip file to a folder.

 

Can you add this to the workflow ?

 

thanks in advance

 

Regards,

Raghu

DavidP
17 - Castor
17 - Castor

Here's a new version.  In the formula tool before the second download tool, you have to edit the path for the filename to where you want the file to be saved.

 

DavidP_0-1594824135975.png

 

raghusrealm
8 - Asteroid

@DavidP  Thanks a lot. Appreciate all the support. Exactly, what I wanted. 

Labels