MATLAB Answers

How do I download a data-file from a link which has a data-confirm-modal?

12 views (last 30 days)
Warwick on 8 May 2020
I'm having trouble downloading a csv file from a webpage using the webread function. To manually download the data-file from the webpage, the user needs to click thru a confirmation pop-up box and I suspect this causing me problems. The data confirmation pop-up box shown below. The webpage coding is also shown.
My Matlab code attempt is below along with the resultant error:
test2 = webread('',options);
I've trialled the webread function on a data-file from the Bureau of Meteorology and it works fine (code below). And I can also successfully use webread to read the '' webpage so I think the username and password is fine. I'm assuming I need another QueryName and QueryValue pair to deal with the pop-up, but I can't find any info about this. Any tips would be much appreciated!
options = weboptions('ContentType','text');
test1 = webread('',options);

Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!