curl -fsSL "https://hydrological.org/api/v1/datasets/hansen-gfc/links.txt?bbox=-75,-20,-50,5" \
| xargs -n 1 curl -fLO
import requests
urls = requests.get("https://hydrological.org/api/v1/datasets/hansen-gfc/links.txt?bbox=-75,-20,-50,5").text.split()
for url in urls:
name = url.rsplit("/", 1)[-1]
with requests.get(url, stream=True) as r, open(name, "wb") as f:
for chunk in r.iter_content(1 << 20):
f.write(chunk)
const res = await fetch("https://hydrological.org/api/v1/datasets/hansen-gfc/links?bbox=-75,-20,-50,5");
const { groups } = await res.json();
for (const g of groups) g.links.forEach(l => console.log(l.url));