Consistently use $SCIHUB_USERNAME and $SCIHUB_PASSWORD

This commit is contained in:
heyarne 2020-11-24 14:31:51 +00:00
commit c82fd70914
6 changed files with 370 additions and 1422 deletions

View file

@ -15,7 +15,8 @@
"source": [
"from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt\n",
"from datetime import date\n",
"import datetime"
"import datetime\n",
"import os"
]
},
{
@ -40,8 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Set up the ~/.netrc using the provided ~/.netrc.example in order for this to work\n",
"api = SentinelAPI(None, None)\n",
"api = SentinelAPI(os.getenv('SCIHUB_USERNAME'), os.getenv('SCIHUB_PASSWORD'))\n",
"\n",
"# the \"footprint\" is what we can use to preselect a certain area;\n",
"# the lake is at (51.7874, 14.4226)\n",
@ -1003,7 +1003,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.8.6"
}
},
"nbformat": 4,