=> Note : the apihub is only accessible for those of you who submitted an account before the 21st of December. As a result, it is much easier to download the Sentinel- products at CNES PEPS facility. To access the data within PEPS, I have written a similar program to the one described below . The Sentinel Scihub interface lets you search the catalog or download Sentinel data through a simple https request. For instance, to search all the S2 products within the catalog, just try the following URLs : To select all the products which contain Toulouse :

  • you may login with your own Scihub account or with « guest », « guest »
  • All you need to know are your site  Lat, Lon (in this order) coordinates.

To select all the products which contain Toulouse ingested in the catalog after the first of December :

 The Python routine, provided via the link at the end of this post, enables batch downloads of Sentinel-1 and Sentinel-2 (and probably soon Sentinel-3), from ESA distribution website. You know me, I have mostly tested it with Sentinel-2.Sentinel_download runs on linux and it relies on the wget download utility. It might work on windows, probably with adaptations, but I do not know windows. If someone is willing to contribute, the software repository on github is open. That’s what happened with the Landsat-download tool. As the tool performs catalog searches, you can select the data by date, type, location, and even, for Sentinel-2, cloud percentage (if you trust ESA L1C cloud percentage). The readme file shows several examples, here, I’ll only provide one : 

python  Sentinel_download.py -s S2 --latmin 43 --latmax 46 --lonmin -1 --lonmax 2 -a apihub.txt -o 94 -m 25 -d 20151206

Here is the meaning of the options :

  • -s defines the satellite (S2, S2A, S2B, S1, S1, S1B)
  • --latmin 43 --latmax 46 --lonmin -1 --lonmax 2 define the bounding box in degrees (you can also only specify a point with --lat and --lon options)
  • - a apihub.txt provide the authentification to the website (guest guest still works)

  • -o is the path number (if you only want that one)

  • -m 25 is the maximum accepted cloud percentage to download (25%)

 

  • -d 20151206 is the start date of the period, and the download goes until now, unless you specify the final date (with -f option)

So, if you want to use this tool, get it from the github repository of sentinel-download.  

71 thoughts on “A python module for batch download of Sentinel data from ESA

  1. Dear Sir, I tried to use the python script for downloading S1 data as described in the readme file. I got the following message and I do not fine any data on my hard disk. Would you please provide some info on the error and where the data will downloadedThanks in advance,Best regards2016-02-02 17:12:58 (422 KB/s) – ‘query_results.xml’ saved [26693]d1aed4e0-8991-4d05-93bf-02eb532ac93c===============================================S1A_IW_SLC__1SDV_20160201T173911_20160201T173938_009756_00E41D_15E6.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘d1aed4e0-8991-4d05-93bf-02eb532ac93c’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160201T173911_20160201T173938_009756_00E41D_15E6.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘d1aed4e0-8991-4d05-93bf-02eb532ac93c’)/\$value »970a37cf-4dd5-4f8c-bb9a-35b51694ecbe===============================================S1A_IW_SLC__1SDV_20160201T173847_20160201T173914_009756_00E41D_0DD9.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘970a37cf-4dd5-4f8c-bb9a-35b51694ecbe’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160201T173847_20160201T173914_009756_00E41D_0DD9.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘970a37cf-4dd5-4f8c-bb9a-35b51694ecbe’)/\$value »7e2dce33-6006-48aa-8ced-c0bd29385583===============================================S1A_IW_SLC__1SDV_20160201T173936_20160201T174003_009756_00E41D_87EF.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘7e2dce33-6006-48aa-8ced-c0bd29385583’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160201T173936_20160201T174003_009756_00E41D_87EF.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘7e2dce33-6006-48aa-8ced-c0bd29385583’)/\$value »1b77b2df-d7e1-4897-8542-4a697cd54bb7===============================================S1A_IW_SLC__1SDV_20160131T055228_20160131T055255_009734_00E382_758A.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘1b77b2df-d7e1-4897-8542-4a697cd54bb7’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160131T055228_20160131T055255_009734_00E382_758A.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘1b77b2df-d7e1-4897-8542-4a697cd54bb7′)/\$value »60cb9cfd-f21c-45e0-9331-a5ef2012fcf8===============================================S1A_IW_SLC__1SDV_20160131T055202_20160131T055230_009734_00E382_C67D.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(’60cb9cfd-f21c-45e0-9331-a5ef2012fcf8′)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160131T055202_20160131T055230_009734_00E382_C67D.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(’60cb9cfd-f21c-45e0-9331-a5ef2012fcf8’)/\$value »7b25a472-364c-4e99-8520-a0e9ffc39e4b===============================================S1A_IW_SLC__1SDV_20160130T175601_20160130T175628_009727_00E345_CAF3.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘7b25a472-364c-4e99-8520-a0e9ffc39e4b’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160130T175601_20160130T175628_009727_00E345_CAF3.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘7b25a472-364c-4e99-8520-a0e9ffc39e4b’)/\$value »eefd89f5-e5d4-4313-a783-71ebb768bb81===============================================S1A_IW_SLC__1SDV_20160130T175510_20160130T175538_009727_00E345_16AD.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘eefd89f5-e5d4-4313-a783-71ebb768bb81’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160130T175510_20160130T175538_009727_00E345_16AD.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘eefd89f5-e5d4-4313-a783-71ebb768bb81’)/\$value »f7056fa5-1974-4c3e-b15a-0f18572bce09===============================================S1A_IW_SLC__1SDV_20160130T175536_20160130T175603_009727_00E345_0F40.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘f7056fa5-1974-4c3e-b15a-0f18572bce09’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160130T175536_20160130T175603_009727_00E345_0F40.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘f7056fa5-1974-4c3e-b15a-0f18572bce09’)/\$value »8ab293b6-c3f8-4375-86e9-289c11535079===============================================S1A_IW_SLC__1SDV_20160130T175445_20160130T175512_009727_00E345_B81E.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘8ab293b6-c3f8-4375-86e9-289c11535079’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160130T175445_20160130T175512_009727_00E345_B81E.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘8ab293b6-c3f8-4375-86e9-289c11535079’)/\$value »118a47e8-4f5c-4a9c-b889-a18e1f744abb===============================================S1A_IW_SLC__1SDV_20160129T060734_20160129T060802_009705_00E2AB_819C.SAFEhttps://scihub.copernicus.eu/apihub/odata/v1/Products(‘118a47e8-4f5c-4a9c-b889-a18e1f744abb’)/\$value===============================================wget –no-check-certificate –user= »guest » –password= »guest » –continue –output-document=./S1A_IW_SLC__1SDV_20160129T060734_20160129T060802_009705_00E2AB_819C.SAFE.zip « https://scihub.copernicus.eu/apihub/odata/v1/Products(‘118a47e8-4f5c-4a9c-b889-a18e1f744abb’)/\$value »

    1. Dear Ahmed,you should also provide the command line you used to simplify the analysis.It seems that you used the -n option (no_download) which does not perform the download and just lists the products. But I see you also tried to use guest account and password which will not work. You need to use your own authentification, and you need to have an account registered before the 21st of december 2015.All of this is written in the Readme file, sometimes it is useful to read the doc (;-)) !Best regards,Olivier

  2. Dear Olivier,thanks for the good effort :DI tried the following code:python Sentinel_download.py –lat 53.4 –lon 9.2 -a apihub.txt(using guest guest password, mine for some reason doesn’t work)and got the following error:Resolving scihub.copernicus.eu… 131.176.236.28Connecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »OData service »Connecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 500 Internal Server Error2016-02-05 18:21:15 ERROR 500: Internal Server Error.Any way to get around the server error?best,Mohammad

    1. Dear Mohammad,\nif you do not use a correct authentification (obtained before december 21st up to now, it should change soon I hope), you cannot download data. Using guest account always ends up with an internal error,\nwith a message saying\n maximum of 2 downloads reached with the account "guest".

  3. Dear Sir, I thank you very much for the assistance. the code works well. Sir, It is logic that downloading stops once the internet connection is cut. However, I wonder whether downloading a certain file starts again from the point at which it stopped before internet is disconnected or not. In other words, if the downloads of a file stops at 30% due to internet connection problems. does it starts again from 30% once the connection is back or it is simply starts from the beginningRegards,Omar

    1. I wasn’t able to download from the web page any sentinel data, can you teach me how to python download below?

  4. Sir, I used the code for downloading this file of sintenel1 over the Tolouse (S1A_IW_GRDH_1SDV_20160206T174740_20160206T174805_009829_00E633_A988.SAFE). Unfortunately, the intensity and amplitude layers of VH can not be displayed using sentinel toolbox. However, once the same file is downloaded manually from DATAHUB, it works. Did you face such a problem!! if so, what do you do advice ?regards,Omar

  5. I did not notice any difference of the two files downloaded manually from the site and by using the script in terms of contents and size. the only difference is the name of the files. Indeed, the one downloaded by the script has the word « SAFE » directly before the extension.

    1. Dear Omar,\nhave you tried to rename it ? Maybe the Sentinel Toolbox searches for a specific name ?\nOlivier

      1. Dear sir, I have used the following command to download sentinel images. It works well but unfortunately the number of images I got is 10 over 2016 only. The command is supposed to download all images starting from 2014. Would you please check the command.python Sentinel_download.py –lat 31.95 –lon -3.7 -a apihub.txt -s S1A*GRDH -d 2014-05-01 -f 2016-04-20Regards,Omar

  6. Hello Sir,I have sent all the downloads i needed to cart, is their a script to download from the products.meta4 file saved.If its possible can i have that too

    1. Sorry Jimmy,\nI do not understand your question. Could you please provide more details ? Which site are you downloading from ? What exactly do you want to do ?\nOlivier

  7. Dear sir,I have used the following command to download sentinel images. It works well but unfortunately the number of images I got is 10 over 2016 only. The command is supposed to download all images starting from 2014. Would you please check the command.python Sentinel_download.py –lat 31.95 –lon -3.7 -a apihub.txt -s S1A*GRDH -d 2014-05-01 -f 2016-04-20Regards,Omar

    1. Dear Omar,the -r option is there to specify a maximum amount of files to download parser.add_option(« -r »,dest= »MaxRecords »,action= »store »,type= »int », \ help= »maximum number of records to download (default=100) »,default=100)But default value is 100, maybe are you using an old version ?And by the way, please comment on the github platform rather that on the blog, for other users to find information on the issues.Best regards,Olivier

    2. Dear Omar, \nsorry for replying late, please download a recent version and use the -r option, for instance -r 500 if you thing you will get less than 500 references.\nSuch comments would be better posted to the github repository.\nOlivier

  8. Dear Sir, Based on the explanation given to download sentinel-1 data, the following command is supposed to download data betweeen 2104 and 2016. Unfortunately, 10 images of 2016 are only downloaded.python Sentinel_download.py –lat 31.95 –lon -3.7 -a apihub.txt -s S1A*GRDH -d 2014-05-01 -f 2016-04-20Regards,

  9. Hi Olivier,I have a problem downloading S1 images of Java, Indonesia (lat -4, lon 111).when i type the following command;python Sentinel_download.py –lat -7 –lon 111 -a apihub.txt -s S1A*SLC -d 20160501 -w /home/boris/data/Sentinel-1/I get the following result, but it does not download any scenes;query_results.xml [ ] 43,08K 232KB/s in 0,2s 2016-06-08 16:11:47 (232 KB/s) – ‘query_results.xml’ saved [44113]dc4a3ad8-6d10-47d6-85b8-47d1c38ace76cb0bd5e1-54c8-4e05-8e8e-c19bf64bea30af04f355-2394-4b4d-a0fd-2506040062c37c41005e-51bc-4042-b8bc-3fcd2f62027a66867cba-ebff-42a8-ab12-b83b4eb4f2ed9f3667a9-6113-46b4-9f91-a5b83111b3ad1a0e2f10-8f66-4780-9514-a49a6d776bf1681f7c0d-41c9-46fd-b519-41197773dd38d29f914e-3298-44be-ae4c-34c5f631b9b42ce6c51e-9621-4749-b022-cf78cd5affe94dadc6dc-4245-421f-95a4-f2f690b040a41f3b0c0b-86ad-4ef6-a9d5-dec63fb8dc8e18102d96-9364-4159-bc26-366c0e7616682d7bfc63-e129-4c51-980a-24440c2d63bfcdc531ff-6082-4159-a103-3bdd76d20b7b9c091ea6-7266-4a1d-88fd-3c2115f90ba3e45efaca-d3e0-4714-b7dd-b322538d0bd1Downloading S2 images works fine.I hope you could help me?BorisK

  10. Hi Olivier,I already found the problem.Tha date of the sentinel-1 data is in a different place. using;date_prod=filename.split(‘_’)[5][0:8]instead ofdate_prod=filename.split(‘_’)[7][1:9]fixed the problem

    1. Thanks a lot Boris, and sorry for that bug. I do not test much with Sentinel-1 download.\nI’ll update the repository as soon as I can.\nOlivier

  11. Hi Olivier, and thanks for your precious software – it definitely saved me a lot of work!I have a question, though: do you happen to have experience on windows 10? I’m trying to run Sentinel_download from Windows shell but I get « Impossible to establish an SSL connection » right after i’m successfully connected to scihub server. (I’m running cmd in Admin mode.) Have you ever had any similar problem?

    1. Scusi Andrea,\nI almost never use windows, and I am not able to test the software with it.\nHope you’ll manage to find a work around.\nOlivier

  12. Hallo,How do you batch process sentinel data in SNAP? I want to subset multiple sentinel images and then carryout an aggregation of the same. Thank you in advanceKennedy

    1. Sorry, I am not a SNAP user. I would do it with python.\nFor SNAP questions, there is a dedicated forum here \nOlivier

  13. Hi there,May i Use PYTHON to download S1 IW SLC data of my site. How it takes no of images to be downloaded?RegardsSingh

    1. Dear Singh,\nI am not sure I understand your question.\nYes, you should be able to download S1 IW SLC data.\nIf you have a problem, please send your command line, so that I can try\nOlivier

  14. Dear Olivier HagolleThanks for a nice tool.I get similar (not identical) errors on both windows (using cygwin) and on LINUX. when trying »python Sentinel_download.py –lat 43.6 –lon 1.44 -a apihub.txt -t 31TCJ » Any suggestions?Regards/Jonas ArdöWINDOWS (using CYGWIN):$ python Sentinel_download.py –lat 43.6 –lon 1.44 -a apihub.txt -t 31TCJwget –no-check-certificate –user= »jonas.ardo@nateko.lu.se » –password= »mypassword » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(43.600000,1.440000) » filename:S2*&rows=100″sh: -c: line 0: syntax error near unexpected token `(‘sh: -c: line 0: `wget –no-check-certificate –user= »jonas.ardo@nateko.lu.se » –password= »mypassword » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(43.600000,1.440000) » filename:S2*&rows=100″‘Traceback (most recent call last): File « Sentinel_download.py », line 230, in xml=minidom.parse(« query_results.xml ») File « /usr/lib/python2.7/xml/dom/minidom.py », line 1918, in parse return expatbuilder.parse(file) File « /usr/lib/python2.7/xml/dom/expatbuilder.py », line 922, in parse fp = open(file, ‘rb’)IOError: [Errno 2] No such file or directory: ‘query_results.xml’Jonas.Ardo@jonasardow8 /cygdrive/H/software$LINUX: [jardo@sentinel SENTINEL]$ python Sentinel_download.py –lat 43.6 –lon 1.44 -a apihub.txt -t 31TCJ » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint:\ »Intersects(43.600000,1.440000)\ » filename:S2*&rows=100″–2016-07-11 08:16:48– https://scihub.copernicus.eu/apihub/search?q=footprint:%22Intersects(43.600000,1.440000)%22%20filename:S2*&rows=100Resolving scihub.copernicus.eu… 131.176.236.28Connecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedConnecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthorization failed.Traceback (most recent call last): File « Sentinel_download.py », line 228, in xml=minidom.parse(« query_results.xml ») File « /usr/lib64/python2.6/xml/dom/minidom.py », line 1918, in parse return expatbuilder.parse(file) File « /usr/lib64/python2.6/xml/dom/expatbuilder.py », line 924, in parse result = builder.parseFile(fp) File « /usr/lib64/python2.6/xml/dom/expatbuilder.py », line 211, in parseFile parser.Parse(«  », True)xml.parsers.expat.ExpatError: no element found: line 1, column 0[jardo@sentinel SENTINEL]$

    1. Dear Jonas,\non linux, you have an authentification problem, your account in the apihub.txt file must be wrong, or maybe you just opened it, as ESA waits for sometime before allowing users to access the apihub (the automatic part of scihub).\n\nOn windows, you are in fact using linux, since it is cygwin. This case is not handled by my tool, I do not know how to detect cygwin, and I can’t test.\nIf you have an idea, it would be useful.\n\nIf you don’t know, you still may remove the following « if », and just use the condition for linux system.\nfor instance replace : \n if sys.platform.startswith(‘linux’) or sys.platform.startswith(‘darwin’):\n value= »\$value »\n else:\n value= »$value »\n\nby value= »\$value »\n\nThis happens 4 times between lines 175 and 204.\nHope you can program in python.\nRegards,\nOlivier\n\nHope you can program in python…

  15. Dear OlivierOn cygwin: Using single quotes (‘) instead of double (« ) for the ‘https:… and so on …’ at least gives me a wget command that produce a query result (below). I am not a python programmer but I will see if I can change the code to produce single quotes. Jonas.Ardo@jonasardow8 /cygdrive/H/software$ wget –no-check-certificate –user= »jonas.ardo@nateko.lu.se » –password= »hul88rutt » –output-document=query_results.xml ‘https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(43.600000,1.440000) » filename:S2*&rows=100’–2016-07-11 22:07:38– https://scihub.copernicus.eu/apihub/search?q=footprint:%22Intersects(43.600000,1.440000)%22%20filename:S2*&rows=100Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 200 OKLength: unspecified [application/atom+xml]Saving to: ‘query_results.xml’query_results.xml [ ] 291.14K 714KB/s in 0.4s2016-07-11 22:07:39 (714 KB/s) – ‘query_results.xml’ saved [298131]Jonas.Ardo@jonasardow8 /cygdrive/H/software

  16. Dear Detect CYGWIN with: import platform platform.system()’CYGWIN_NT-6.3′ ps published my password in the last post, now changed, but remove before it gets public.Regards/Jonas

  17. Dear Olivier Hagolle,thanks very much for your nice tool!I use Linux (openSUSE 13.2 (Harlequin) (x86_64)). When I apply your test command:Sentinel_download.py -s S2 –latmin 43 –latmax 46 –lonmin -1 –lonmax 2 -a apihub.txt -o 94 -m 25 -d 20151206I get the following answer:wget –no-check-certificate –user= »myself » –password= »secret » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint:\ »Intersects(POLYGON((-1.0 43.0, 2.0 43.0, 2.0 46.0, -1.0 46.0,-1.0 43.0)))\ » filename:S2*R094*&rows=100″–2016-07-28 10:45:11– https://scihub.copernicus.eu/apihub/search?q=footprint:%22Intersects(POLYGON((-1.0%2043.0,%202.0%2043.0,%202.0%2046.0,%20-1.0%2046.0,-1.0%2043.0)))%22%20filename:S2*R094*&rows=100Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.Unable to establish SSL connection.Traceback (most recent call last): File « Sentinel_download.py », line 235, in xml=minidom.parse(« query_results.xml ») File « /srv/fluo5/hannesd/gdal/install_py_et_al/python_GFZ/python/lib/python3.5/xml/dom/minidom.py », line 1958, in parse return expatbuilder.parse(file) File « /srv/fluo5/hannesd/gdal/install_py_et_al/python_GFZ/python/lib/python3.5/xml/dom/expatbuilder.py », line 912, in parse result = builder.parseFile(fp) File « /srv/fluo5/hannesd/gdal/install_py_et_al/python_GFZ/python/lib/python3.5/xml/dom/expatbuilder.py », line 211, in parseFile parser.Parse(«  », True)xml.parsers.expat.ExpatError: no element found: line 1, column 0Is this also an authentication problem like in the proposed case of Jonas Ardö? wget should ignore the SSL-certificate when using the keyword « –no-check-certificate », right?Thanks in advance!Hannes

    1. Dear Hannes, \nIt is probably a problem on your side, maybe on your proxy, I don’t know and can’t reproduce the issue.\nHope you’ll find,\nRegards,\nOlivier\n\nPS : you sent me your password, I changed it on the comment, I won’t use it, I swear !

  18. Hi Olivier,thank you very much for your work, it is a very usefull tools.I just have a litlle questions (maybe you have already answered but i don’t find it).Is it possible in one task, to request more than one tiles, like this: Sentinel_download.py –lat 43.6 –lon 1.44 -a apihub.txt -o 51 -t 31TCJ 31TCK ? RegardsLéo

    1. Hi Leo,\nSorry, this was not implemented, just run it twice, I don’t think it takes much more time.\nGiven that ESA is going to change the packaging of its products this autumn to directly deliver its products by tiles, I don’t think I will implement it.\nCheers\nOlivier

  19. Occasionally I receive « Internal Server Error »using identical syntax (python Sentinel_download.py –lat 66.00 –lon 78.55 -a apihub.txt –dhus -d 20150623 -f 20161015 -t 34WDA -w /mnt/SDATA1/S2a/34WDA/) that normally works. Is this to be interpreted as a error on the server side or is there anything to be done about it?Regards/Jonas ArdöError message received:Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 500 Internal Server Error2016-10-16 12:24:54 ERROR 500: Internal Server Error.

    1. Hi, It might be due to the fact that Sentinel-2 now distributes data per tiles and not any more by swath. I haven’t had time to adapt the software. I tried this week-end but the scihub server was down…Olivier

  20. Script starts OK and download some files (about 23 Mb) but the ./GRANULE/S2A_OPER_MSI…/IMG_DATA directory is not created but stored as a file (see listing below). And then is no more data retrieved.Regards/Jonas[] ls -alRtotal 156drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 .drwxr-xr-x. 26 jardo users 4096 Nov 17 10:22 ..drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 AUX_DATAdrwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 DATASTRIPdrwxr-xr-x. 3 jardo users 4096 Nov 17 10:22 GRANULEdrwxr-xr-x. 2 jardo users 4096 Nov 17 10:22 HTML-rw-r–r–. 1 jardo users 18652 Nov 17 10:22 INSPIRE.xml-rw-r–r–. 1 jardo users 0 Nov 17 10:31 lits.txt-rw-r–r–. 1 jardo users 60488 Nov 17 10:22 manifest.safedrwxr-xr-x. 2 jardo users 4096 Nov 17 10:22 rep_info-rw-r–r–. 1 jardo users 45177 Nov 17 10:22 S2A_OPER_MTD_SAFL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.xml./AUX_DATA:total 8drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 …/DATASTRIP:total 12drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 ..drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 S2A_OPER_MSI_L1C_DS_SGS__20161112T134018_S20161112T083553_N02.04./DATASTRIP/S2A_OPER_MSI_L1C_DS_SGS__20161112T134018_S20161112T083553_N02.04:total 22660drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 ..drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 QI_DATA-rw-r–r–. 1 jardo users 23187933 Nov 17 10:23 S2A_OPER_MTD_L1C_DS_SGS__20161112T134018_S20161112T083553.xml./DATASTRIP/S2A_OPER_MSI_L1C_DS_SGS__20161112T134018_S20161112T083553_N02.04/QI_DATA:total 8drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 …/GRANULE:total 12drwxr-xr-x. 3 jardo users 4096 Nov 17 10:22 .drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 ..drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04./GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04:total 12drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 3 jardo users 4096 Nov 17 10:22 ..drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 AUX_DATA-rw-r–r–. 1 jardo users 0 Nov 17 10:23 IMG_DATA./GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04/AUX_DATA:total 12drwxr-xr-x. 2 jardo users 4096 Nov 17 10:23 .drwxr-xr-x. 3 jardo users 4096 Nov 17 10:23 ..-rw-r–r–. 1 jardo users 810 Nov 17 10:23 S2A_OPER_AUX_ECMWFT_SGS__20161112T134018_V20161112T060000_20161112T180000./HTML:total 180drwxr-xr-x. 2 jardo users 4096 Nov 17 10:22 .drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 ..-rw-r–r–. 1 jardo users 42377 Nov 17 10:22 banner_1.png-rw-r–r–. 1 jardo users 58643 Nov 17 10:22 banner_2.png-rw-r–r–. 1 jardo users 44797 Nov 17 10:22 banner_3.png-rw-r–r–. 1 jardo users 1890 Nov 17 10:23 star_bg.jpg-rw-r–r–. 1 jardo users 6255 Nov 17 10:22 UserProduct_index.html-rw-r–r–. 1 jardo users 10331 Nov 17 10:22 UserProduct_index.xsl./rep_info:total 12drwxr-xr-x. 2 jardo users 4096 Nov 17 10:22 .drwxr-xr-x. 7 jardo users 4096 Nov 17 10:31 ..-rw-r–r–. 1 jardo users 1022 Nov 17 10:22 S2_User_Product_Level-1C_Metadata.xsd–2016-11-17 10:34:57– https://scihub.copernicus.eu/apihub/odata/v1/Products('a71ef6ff-7dab-407f-8a28-07ad4ad5335e‘)/Nodes(‘S2A_OPER_PRD_MSIL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.SAFE’)/Nodes(‘GRANULE’)/Nodes(‘S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04’)/Nodes(‘IMG_DATA’)/$valueResolving scihub.copernicus.eu… 131.176.236.28Connecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedReusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 0 [application/octet-stream]Saving to: “/jumbo/jardo/SENTINEL/35PRQ//S2A_OPER_PRD_MSIL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04/IMG_DATA” [ ] 0 –.-K/s in 0sLast-modified header invalid — time-stamp ignored.2016-11-17 10:34:57 (0.00 B/s) – “/jumbo/jardo/SENTINEL/35PRQ//S2A_OPER_PRD_MSIL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04/IMG_DATA” saved [0/0]–2016-11-17 10:34:57– https://scihub.copernicus.eu/apihub/odata/v1/Products('a71ef6ff-7dab-407f-8a28-07ad4ad5335e‘)/Nodes(‘S2A_OPER_PRD_MSIL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.SAFE’)/Nodes(‘GRANULE’)/Nodes(‘S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04’)/Nodes(‘IMG_DATA’)/$valueResolving scihub.copernicus.eu… 131.176.236.28Connecting to scihub.copernicus.eu|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedReusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 0 [application/octet-stream]Saving to: “/jumbo/jardo/SENTINEL/35PRQ//S2A_OPER_PRD_MSIL1C_PDMC_20161112T155051_R121_V20161112T082202_20161112T082202.SAFE/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20161112T134018_A007268_T35PRQ_N02.04/IMG_DATA” [ ] 0 –.-K/s in 0s

    1. Dear all,I have had the very same problem since November.Any news to solve this issue?Thanks,Tristan

  21. Dear Oliver, I really appreciate your kindness to share your code, it has made my life easier in the last two months. However since last week the code is not working and is giving me the follow message:  » File « Sentinel_download.py », line 281, in date_prod=filename.split(‘_’)[7][1:9]IndexError: list index out of rangeI used your « Toulose » example and had the same answer. Any chance you know the stupid thing I am doing?Thank a lot.Best,Andre

  22. Dear OliverThank you for very useful tools. But I do got error that I have no clue why.python Sentinel_download.py –lat 0 –lon 114 -a apihub.txt -d 20160901 -s S1A*GRDwget –no-check-certificate –user= »xxx » –password= »xxx » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(0.000000,114.000000) » filename:S1A*GRD*&rows=100″–2016-12-29 15:32:23– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(0.000000,114.000000)%20filename:S1A*GRD*&rows=100Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 500 Internal Server Error2016-12-29 15:32:24 ERROR 500: Internal Server Error.It seems like that my account is unauthorized, and that confuse me. I made my account last year, so it is not a new one. But yea, I didn’t really use it for a long time because the server is not stable (I download from ASF server instead).And I have tried again to use my account trough copernicus webgis server and it work, but now I need the automation for downloading. Is it now possible to execute the script using new registered account? Then I should probbaly make new email as well.thank you

  23. Hello, I want to download Sentinel 1 (GRDH, IW) data of a region from 2014 to 2017 so it will be easier for me to use Olivier’s code.However, I’m not very good at programming with Python. I’m currently working on Windows 10 and I need some help. Can someone (who works also on Windows) share his code so I can see what I should change or not ? It would help me a lot ! Plus, I read on the « readme » that I need to install « Aria2 ». Is it a module for python or something else ? How do I install it ?Thank a lot,GeckoTokay

    1. Sorry, I do not know how to install aria2 on window, as I am not a Windows user.\naria2 is a program, A research on the web gave me for instance that URL toio download it\nhttp://www.softpedia.com/get/Internet/File-Sharing/aria2.shtml\n\nBut once again, Windows is not my system…\nOlivier

  24. Dear Oliver,I downloaded the last version from github platform and I trying run the code to download only one tile but I have a problem. I retrieval this message: »File « Sentinel_download.py », line 389, in url_header=url_header.replace(« eu/odata », »eu/apihub/odata »)NameError: name ‘url_header’ is not defined »Excuse me but I don’t work with python. Could you say me what’s the trouble?Thank youMarcela

  25. Dear Olivier,I’m trying to download S1 SLC data. Could you please clarify how can we specify the option to download Ascending or Descending images?I tried to download with this query:python Sentinel_download.py –latmin 9.3 –latmax 11.07 –lonmin -1.97 –lonmax 0.68 -a apihub.txt -d 20160101 -f 20160301 -s S1A*SLC -w /media/data/data8/Sentinel1/I got an « query_results.xml » that contains all sentinel 1 images from 2015 to 2017! (although I specified Jan2016 to March 2016)! is there any option that i’m missing or have to modify?My query only give the « query_results.xml » file but does not download any image. I had to use the Wget and go through the whole .XML with bash lines to select the name of the image and the download link to give it then to wget and be able to download all the listed images in the .xml. Should it work like that? or with the sentinel.py query I’m supposed to download directly the images and i’m just missing a download option in my query?!!Many thanks,Hajar

    1. You’re right, as the Scihub interface does not allow to select by acquisition date, but only by production date (or maybe I missed something ?).\nSo my tool selects the right dates a posteriori by scanning the query_results.xml\n\nBest regards,\nOlivier

  26. Hello,I am trying to download sentinel product in windows but i have this error C:\Users\alejandro vergara\Desktop\Sentinel>python Sentinel_download.py –latmin 51.75 –latmax 52.25 –lonmin -23.00 –lonmax 23.75 -a apihub.txt -s S1A*GRDH -w /home/mateuszk/Testy -d 20160508wget –no-check-certificate –user= »xxxx » –password= »xxxx » –output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(POLYGON((-23.0 51.75, 23.75 51.75, 23.75 52.25, -23.0 52.25,-23.0 51.75))) » filename:S1A*GRDH*&rows=100″wget: invalid option — 2Usage: wget [OPTION]… [URL]…Try `wget –help’ for more options.Traceback (most recent call last): File « Sentinel_download.py », line 280, in xml=minidom.parse(« query_results.xml ») File « C:\Python27\lib\xml\dom\minidom.py », line 1918, in parse return expatbuilder.parse(file) File « C:\Python27\lib\xml\dom\expatbuilder.py », line 922, in parse fp = open(file, ‘rb’)IOError: [Errno 2] No such file or directory: ‘query_results.xml’

    1. Maybe something wrong in your password.\nThe clue should be in this message : wget: invalid option — 2

  27. Hello,I am trying to download sentinel 2 products in windows command line but i have this error:(C:\Users\gisadmin.ICARO\Anaconda2) C:\Users\gisadmin.ICARO\Downloads\Sentinel-download-master>python Sentinel_download.py -s S2 –latmin 43 –latmax 46 –lonmin -1 –lonmax 2 -a apihub.txt -o 94 -m 25 -d 20151206wget –no-check-certificate –user= »myuser » –password= »mypassword »–output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(POLYGON((-1.0 43.0, 2.0 43.0, 2.0 46.0, -1.0 46.0,-1.0 43.0))) » filename:S2*R094* producttype:S2MSI1C &rows=100″‘wget’ is not recognized as an internal or external command,operable program or batch file.Traceback (most recent call last): File « Sentinel_download.py », line 280, in xml=minidom.parse(« query_results.xml ») File « C:\Users\gisadmin.ICARO\Anaconda2\lib\xml\dom\minidom.py », line 1918, in parse return expatbuilder.parse(file) File « C:\Users\gisadmin.ICARO\Anaconda2\lib\xml\dom\expatbuilder.py », line 922, in parse fp = open(file, ‘rb’)IOError: [Errno 2] No such file or directory: ‘query_results.xml’

  28. We fix the enviroment variables but its not working, can you help me please:C:\Users\gisadmin.ICARO\Downloads\Sentinel-download-master>python Sentinel_download.py -s S2 –latmin 43 –latmax 46 –lonmin -1 –lonmax 2 -a apihub.txt -o 94 -m 25 -d 20151206wget –no-check-certificate –user= »myuser » –password= »mipassword »–output-document=query_results.xml « https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(POLYGON((-1.0 43.0, 2.0 43.0, 2.0 46.0, -1.0 46.0,-1.0 43.0))) » filename:S2*R094* producttype:S2MSI1C &rows=100″wget: invalid option — ‘1’wget: invalid option — ‘.’wget: invalid option — ‘0’Usage: wget [OPTION]… [URL]…Try `wget –help’ for more options.Traceback (most recent call last): File « Sentinel_download.py », line 280, in xml=minidom.parse(« query_results.xml ») File « C:\Users\gisadmin.ICARO\Anaconda2\lib\xml\dom\minidom.py », line 1918, in parse return expatbuilder.parse(file) File « C:\Users\gisadmin.ICARO\Anaconda2\lib\xml\dom\expatbuilder.py », line 922, in parse fp = open(file, ‘rb’)IOError: [Errno 2] No such file or directory: ‘query_results.xml’

  29. Dear Christian,I am not good with windows, having no computer with windows installed. My guess would be that the quotes in the footprint expression should be protected, replacing  » by \ ». But I can’t test it.The best would be to ask questions in the github platform as other users who succeeded with windows could answer.Best regards,Olivier

  30. Dear Olivier,thanks for the nice tool. I couldn’t get it to work on Windows, so I switched to a Linux machine. I was interested in using it for downloading Sentinel-2 L2A data. For some reason, the script still wouldn’t run. I started digging into your code, and found that this line was causing the error:if names[i].find(‘SAFL1C’)>0 or names[i].find(‘MSIL1C’)>0:I had to add the L2A, and now it works fine:if names[i].find(‘SAFL1C’)>0 or names[i].find(‘MSIL1C’)>0 or names[i].find(‘MSIL2A’)>0:

    1. Thanks,\nI am downloading through my other tool peps_download. \nI guess this one needs a little refreshing.\nI will try tio find some time…\nOlivier

  31. Another issue is that – at least if you download a specific tile – the file « MTD_MSIL2A.xml » does not get downloaded, while you need it to open the tile in SNAP. You could consider fixing that as well 🙂

  32. Salut,J’ai trouvé un minibug dans le code.La version que j’ai date du 2 mai de cette année.Il plante sur :./Sentinel_download.py –latmin 43 –latmax 46 –lonmin -1 –lonmax 2 -a apihub.txt -o 94 -m 23 -d 2015-12-06 -n -s S2Le correctif : —————————————————-avant : if options.sentinel.find(« S2 ») >=0 : for node in prod.getElementsByTagName(« double »): (name,field)=node.attributes.items()[0] if field== »cloudcoverpercentage »: cloud=float((node.toxml()).split(‘>’)[1].split(‘=0 : for node in prod.getElementsByTagName(« double »): (name,field)=node.attributes.items()[0] if field== »cloudcoverpercentage »: cloud=float((node.toxml()).split(‘>’)[1].split(‘<')[0]) else: continue print "cloud percentage = %5.2f %%"%cloud else: cloud=0… rajouté un else: continue car le champ recherché n'est pas en première position.Merci pour ce boulot 🙂

  33. I think I have a mismatch between the requested period and the actual returned dates. My command:python Sentinel_download.py –lat 12.44966 –lon -87.05445 -a apihub.txt -d 2017-07-01 -f 2017-08-01 -n -s S2but then I get the following (i keep the relevant info only):S2A_MSIL1C_20170721T161351_N0205_R140_T16PDU_20170721T162051.SAFES2A_MSIL1C_20170323T161341_N0204_R140_T16PDU_20170323T162615.SAFES2A_MSIL1C_20170701T161341_N0205_R140_T16PDU_20170701T162605.SAFEWhy do I get an image for 20170323 if I requested July only?Thanks

  34. Hello,I tried to use the script to download Sentinel-2 data using the code from examples. Script is running well, however the query_results.xml is empty. Not totally empty but it seems like the script hadn’t found any data according to my selection.At first I thought that there is not data available. I had a look at XML created by script and I also manually opened XML how it should have looked like.The script produced this URL: https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(43.600000,1.440000) filename:S2*R051* producttype:S2MSI1CHowever, It should look like this:https://scihub.copernicus.eu/apihub/search?q=footprint: »Intersects(43.600000,1.440000) » filename:S2*R051* producttype:S2MSI1CWhen I put the second link into a browser, XML shows 122 results, XML created by script contains 0 results. Any help ?

    1. Hi,\nthanks for the bug report. Il will have a look, even if I would rather recommend using my other tool, peps_download : https://github.com/olivierhagolle/peps_download\nPlease use the github repository to raise issues, it will be much better handled that in the blog comments.\nAnd to reproduce this issue, I would need the command line you used, and to know if you were working on linux and windows.\nBest regards,\nOlivier

  35. Hi Olivier,I’ve been trying to use your script using python Sentinel_download.py –lat 43.6 –lon 1.44 -a apihub.txt -o 51 -n -s S2 but the query_results.xml contains no scenes listed , the last line in file is tried manual search, which does produce sceneshttps://[username]:[password]@scihub.copernicus.eu:443/apihub/search?q=footprint: »Intersects(43.6,1.44) » filename:S2*tried on both a windows PC with and without proxy requirementsany ideas?

    1. Sorry for that. As said in the documentation, I have no windows computer (and do not want to have one ;)) . As a result, I cannot test whether it works or not on that platform. My guess is that some special characters need to be protected when the url is passed to wget. At least, it is the case on linux\n\nI recommend you to try with the wget command itself until you find how to pass the URL, and then report the necessary modifications within the code.\nbest regards,\nOlivier

  36. Hi Olivier,Thank you for share the download scriptsI’ve been trying to use your script in Windows usingpython D:\data\Sentinel-2\Sentinel-download\Sentinel_download.py –latmin 17.7 –latmax 20.7 –lonmin 108.2 –lonmax 111.5 -a D:\data\Sentinel-2\Sentinel-download\apihub.txt -m 10 -d 20181029 -f 201810 -w D:\data\Sentinel-2\Sentinel-download\data -r 500 -s S2my apihub.txt is my own username and password of https://scihub.copernicus.eu/dhus/#/home/but I failed with outout below, can you help me? or I just turn to Linux for use of your script?thank you very much!–2018-11-28 10:31:25– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(POLYGON((108.2Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 1324 (1.3K) [application/xml]Saving to: ‘query_results.xml’query_results.xml 100%[=========================================================================================================================================================================>] 1.29K –.-KB/s in 0s2018-11-28 10:31:27 (6.91 MB/s) – ‘query_results.xml’ saved [1324/1324]–2018-11-28 10:31:27– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:27– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:27– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:27– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:27– http://20.7,/Resolving 20.7, (20.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,’–2018-11-28 10:31:27– http://108.2/Resolving 108.2 (108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘108.2’–2018-11-28 10:31:27– http://20.7,108.2/Resolving 20.7,108.2 (20.7,108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,108.2’–2018-11-28 10:31:27– ftp://17.7)))%20filename/S2*%20producttype:S2MSI1C%20&rows=100&start=0 => ‘.listing’Resolving 17.7))) filename (17.7))) filename)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7))) filename’FINISHED –2018-11-28 10:31:27–Total wall clock time: 1.6sDownloaded: 1 files, 1.3K in 0s (6.91 MB/s)–2018-11-28 10:31:27– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(POLYGON((108.2Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 1320 (1.3K) [application/xml]Saving to: ‘query_results.xml’query_results.xml 100%[=========================================================================================================================================================================>] 1.29K –.-KB/s in 0s2018-11-28 10:31:28 (7.41 MB/s) – ‘query_results.xml’ saved [1320/1320]–2018-11-28 10:31:28– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:28– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:28– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:28– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:28– http://20.7,/Resolving 20.7, (20.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,’–2018-11-28 10:31:28– http://108.2/Resolving 108.2 (108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘108.2’–2018-11-28 10:31:28– http://20.7,108.2/Resolving 20.7,108.2 (20.7,108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,108.2’–2018-11-28 10:31:28– ftp://17.7)))%20filename/S2*%20producttype:S2MSI1C%20&rows=100&start=100 => ‘.listing’Resolving 17.7))) filename (17.7))) filename)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7))) filename’FINISHED –2018-11-28 10:31:29–Total wall clock time: 1.6sDownloaded: 1 files, 1.3K in 0s (7.41 MB/s)–2018-11-28 10:31:29– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(POLYGON((108.2Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 1320 (1.3K) [application/xml]Saving to: ‘query_results.xml’query_results.xml 100%[=========================================================================================================================================================================>] 1.29K –.-KB/s in 0s2018-11-28 10:31:30 (6.67 MB/s) – ‘query_results.xml’ saved [1320/1320]–2018-11-28 10:31:30– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:30– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:30– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:30– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:30– http://20.7,/Resolving 20.7, (20.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,’–2018-11-28 10:31:30– http://108.2/Resolving 108.2 (108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘108.2’–2018-11-28 10:31:30– http://20.7,108.2/Resolving 20.7,108.2 (20.7,108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,108.2’–2018-11-28 10:31:30– ftp://17.7)))%20filename/S2*%20producttype:S2MSI1C%20&rows=100&start=200 => ‘.listing’Resolving 17.7))) filename (17.7))) filename)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7))) filename’FINISHED –2018-11-28 10:31:30–Total wall clock time: 1.8sDownloaded: 1 files, 1.3K in 0s (6.67 MB/s)–2018-11-28 10:31:31– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(POLYGON((108.2Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 1324 (1.3K) [application/xml]Saving to: ‘query_results.xml’query_results.xml 100%[=========================================================================================================================================================================>] 1.29K –.-KB/s in 0s2018-11-28 10:31:32 (2.85 MB/s) – ‘query_results.xml’ saved [1324/1324]–2018-11-28 10:31:32– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:32– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:32– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:32– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:32– http://20.7,/Resolving 20.7, (20.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,’–2018-11-28 10:31:32– http://108.2/Resolving 108.2 (108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘108.2’–2018-11-28 10:31:32– http://20.7,108.2/Resolving 20.7,108.2 (20.7,108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,108.2’–2018-11-28 10:31:33– ftp://17.7)))%20filename/S2*%20producttype:S2MSI1C%20&rows=100&start=300 => ‘.listing’Resolving 17.7))) filename (17.7))) filename)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7))) filename’FINISHED –2018-11-28 10:31:33–Total wall clock time: 2.1sDownloaded: 1 files, 1.3K in 0s (2.85 MB/s)–2018-11-28 10:31:33– https://scihub.copernicus.eu/apihub/search?q=footprint:Intersects(POLYGON((108.2Resolving scihub.copernicus.eu (scihub.copernicus.eu)… 131.176.236.28Connecting to scihub.copernicus.eu (scihub.copernicus.eu)|131.176.236.28|:443… connected.HTTP request sent, awaiting response… 401 UnauthorizedAuthentication selected: Basic realm= »Sentinels Scientific Data Hub Search »Reusing existing connection to scihub.copernicus.eu:443.HTTP request sent, awaiting response… 200 OKLength: 1320 (1.3K) [application/xml]Saving to: ‘query_results.xml’query_results.xml 100%[=========================================================================================================================================================================>] 1.29K –.-KB/s in 0s2018-11-28 10:31:34 (6.34 MB/s) – ‘query_results.xml’ saved [1320/1320]–2018-11-28 10:31:34– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:34– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:34– http://17.7,/Resolving 17.7, (17.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7,’–2018-11-28 10:31:34– http://111.5/Resolving 111.5 (111.5)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘111.5’–2018-11-28 10:31:34– http://20.7,/Resolving 20.7, (20.7,)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,’–2018-11-28 10:31:34– http://108.2/Resolving 108.2 (108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘108.2’–2018-11-28 10:31:34– http://20.7,108.2/Resolving 20.7,108.2 (20.7,108.2)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘20.7,108.2’–2018-11-28 10:31:34– ftp://17.7)))%20filename/S2*%20producttype:S2MSI1C%20&rows=100&start=400 => ‘.listing’Resolving 17.7))) filename (17.7))) filename)… failed: 不知道这样的主机。 .wget: unable to resolve host address ‘17.7))) filename’FINISHED –2018-11-28 10:31:34–Total wall clock time: 1.5sDownloaded: 1 files, 1.3K in 0s (6.34 MB/s)

    1. Hi,\nThis kind of question should be asked by raising issues on github, other users might reply there. \nI do not use windows, so I am not able to solve this. The issue comes from the presence of whitespace in the requests sent by wget. There should be a way to protect these whitespaces, but I do not know the Windows way.\nOlivier

  37. Dear Olivier,I tried to use Sentinel_download.py to download sentinel 2 data. It worked but I got only query_results.xml file and not the real data. What happened?Best regards,Jinlong

    1. Hi Jinlong, \nplease open an issue on the github website, with the command line and detailed logs. Or better use my peps_download.py tool, https://github.com/olivierhagolle/peps_download \nIt downloads data from the French PEPS platform, whic is a global mirror of Copernicus data. It is the code I use and maintain.\nOlivier

Répondre à Jonas Ardö Annuler la réponse

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.