Last active
April 13, 2024 14:35
-
-
Save willrayeo/39596e5756e018e1c0f52d65680fd5ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
I'd recommend directing your question to the community forum.
I also face the same problem. Is there already a solution for this? There is no answer in the community forum on this?
I face the same problem too. Only the first zip file is right. The rest zip files are corrupted.
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
Hi, I'm having trouble in making it workable for a loop of multiple Ids . any hint how can I work on it /