Download data from a webpage after putting in login credentials.

I want to download multiple GPS data files form the website "https://cddis.nasa.gov/archive/gnss/data/daily/", but now I have to first login through the webpage "https://urs.earthdata.nasa.gov/home/" earthdata login page then I am redirceted to the cddis webpage. Can I login with my user credentials into the website through matlab and obtain the data structure of files availabe in the cddis site to download the linked files?
I have tried the following code:
url = 'https://urs.earthdata.nasa.gov/home/';
options = weboptions('username','myid','password','mypwd','Timeout',30);
data = webread(url,options);
This generates the variable "data" in the workspace but it contains "<!DOCTYPE html><!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"> <![endif]--><!" .
It would be a great help if anyone could help me with this.
Thanks in advance.

Respuestas (2)

Lin Yan
Lin Yan el 1 de Mayo de 2024
I just used 'websave' with the following options, and it worked to download urls from earthdata.
options = weboptions('username','myid','password','mypwd','Timeout',30);

Categorías

Más información sobre Downloads en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Preguntada:

el 3 de Dic. de 2021

Respondida:

el 1 de Mayo de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by