From 0edca53f686d860bbd1b1929a48ac01b3f57cd5f Mon Sep 17 00:00:00 2001 From: Remi Cresson <remi.cresson@irstea.fr> Date: Mon, 28 Feb 2022 15:07:34 +0100 Subject: [PATCH] WIP: S2 download --- scenes/download.py | 2 +- test/download_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scenes/download.py b/scenes/download.py index 7be738e..d36b7c5 100644 --- a/scenes/download.py +++ b/scenes/download.py @@ -8,7 +8,7 @@ import json from urllib.parse import urlencode -def curl_url(url, postdata, verbose=False, fp=None, header=['Accept:application/json']): +def curl_url(url, postdata, verbose=False, fp=None, header=('Accept:application/json')): """ Use PyCurl to make some requests :param url: url diff --git a/test/download_test.py b/test/download_test.py index 7bc93c7..feeb11d 100644 --- a/test/download_test.py +++ b/test/download_test.py @@ -1,5 +1,6 @@ import argparse from scenes import download, utils +import datetime # Arguments parser = argparse.ArgumentParser(description="Download test",) @@ -9,4 +10,4 @@ params = parser.parse_args() # Get all scenes in the root_dir _, _, bbox = utils.get_epsg_extent_bbox(params.refimage) -download.download(config_file=params.theia_cfg, acq_envelope=bbox, acq_date='01-01-2021') \ No newline at end of file +download.download(config_file=params.theia_cfg, acq_envelope=bbox, acq_date=datetime.datetime(year=2020, month=01, day=01)) \ No newline at end of file -- GitLab