Skip to content

Instantly share code, notes, and snippets.

@willrayeo
Last active April 13, 2024 14:35
Show Gist options
  • Save willrayeo/39596e5756e018e1c0f52d65680fd5ff to your computer and use it in GitHub Desktop.
Save willrayeo/39596e5756e018e1c0f52d65680fd5ff to your computer and use it in GitHub Desktop.
url = f"https://zipper.dataspace.copernicus.eu/odata/v1/Products(acdd7b9a-a5d4-5d10-9ac8-554623b8a0c9)/$value"
headers = {"Authorization": f"Bearer {access_token}"}
session = requests.Session()
session.headers.update(headers)
response = session.get(url, headers=headers, stream=True)
with open("product.zip", "wb") as file:
for chunk in response.iter_content(chunk_size=8192):
if chunk:
file.write(chunk)
@kzar20
Copy link

kzar20 commented Apr 13, 2024

Hello William, I have the same problem. I would appreciate knowing if the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment