This is an example of my url which could be download instantly:
https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD021KM/2022/152/MOD021KM.A2022152.1930.061.2022153073644.hdf
How can i download it? I already tried 'Requests', 'urllib' and 'hdf5' and nighder worked out. it's almost 71 mb but some of libraries like urllib download it with 11 kb!
Tried:
from urllib import request
URL = 'https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD021KM/2022/152/MOD021KM.A2022152.1930.061.2022153073644.hdf'
local_filename, headers = urllib.request.urlretrieve(URL)
and
response = requests.get(url)
with h5py.File("local_file.hdf5", "w") as f:
f.write(response.content)
But nighter worked out.