Download data from a webpage after putting in login credentials.

25 views (last 30 days)
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.

Answers (1)

Prince Kumar
Prince Kumar on 19 Jan 2022

Categories

Find more on Downloads in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!