download using wget from http manifest

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
laurare
Posts: 6
Joined: Wed Aug 04, 2021 1:36 pm America/New_York
Answers: 0

download using wget from http manifest

by laurare » Mon Aug 28, 2023 9:42 pm America/New_York

Hello,
I'm having the same problem when I write: wget -O - 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/requested_files_1.tar?h=ocdist301&p=/data1/e040135b90e8436b/requested_files' | wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --auth-no-challenge=on --no-check-certificate --content-disposition -i -
In my case, the order will expire on September 2. I also tried with Python, importing wget and tarfile:

import wget
import tarfile
output_directory = '/Users/laura/Desktop'
url = 'https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/requested_files_1.tar?h=ocdist301&p=/data1/e040135b90e8436b/requested_files'

file = wget.download(url,output_directory)
tar = tarfile.open('/Users/laura/Desktop/requested_files_1.tar','r')

I could dowload a requested_files_1.tar file with wget.download. However, the file is corrupted, I couldnt't open it. I did so many tests, I even tried obdaac_download without success. I'm out of ideas.

Thank you
Laura

Tags:

OB ODPS - towens
Subject Matter Expert
Subject Matter Expert
Posts: 378
Joined: Fri Feb 05, 2021 9:17 am America/New_York
Answers: 0
Been thanked: 4 times

Re: download using wget from http manifest

by OB ODPS - towens » Tue Aug 29, 2023 9:36 am America/New_York

See if the tar file you downloaded is actually an HTML file. If so, open it in a browser. There may be a clue to the download failure in there.

Tommy

laurare
Posts: 6
Joined: Wed Aug 04, 2021 1:36 pm America/New_York
Answers: 0

Re: download using wget from http manifest

by laurare » Tue Aug 29, 2023 10:20 pm America/New_York

Thank you very much!! it worked

Post Reply