How to read files from a particular website?

1 view (last 30 days)
Pouya
Pouya on 3 Mar 2022
Commented: Ive J on 3 Mar 2022
Hello,
I'm having problem with matlab not recognizing the files in this link ( https://swarm-diss.eo.esa.int/#swarm/Level1b/Entire_mission_data/MAGx_HR/Sat_A )
There should be multiple files each about 300mb with their names starting with "SW_OPER_MAGA_HR". But instead matlab read something else as " 1x136910 char ".
Please see the code below:
clc
clear
web='https://swarm-diss.eo.esa.int/#swarm/Level1b/Entire_mission_data/MAGx_HR/Sat_A';
str=webread(web);
fn=regexpi(str,'SW[A-Z_0-9]+.zip','match');
for k=1:size(fn,2)
file=fn{k};
unzip([web file(8:9)]);
end
Thank you in advance.
  1 Comment
Ive J
Ive J on 3 Mar 2022
Your url is protected by cookies, I guess your best chance is to try with Python. MATLAB is quite immature for web scraping.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!