How do I download a data-file from a link which has a data-confirm-modal?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi
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:
options=weboptions('Username','redacted','Password','redacted','Timeout',Inf,'ContentType','text');
test2 = webread('https://midnorthmesonet-api.taindata.com/admin/sites/29/download_csv_data',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 'https://midnorthmesonet-api.taindata.com/admin/sites' 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('http://www.bom.gov.au/fwo/IDS60801/IDS60801.94681.axf',options);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Downloads에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!