From bb42745781e27189a29574ada09f9442da1ecef9 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Wed, 25 May 2022 10:01:11 +0200 Subject: [PATCH] Handle full authorization header --- naviki_gpx_download.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/naviki_gpx_download.py b/naviki_gpx_download.py index 05286d8..bd042b6 100644 --- a/naviki_gpx_download.py +++ b/naviki_gpx_download.py @@ -6,6 +6,8 @@ import pathlib # set this to your token (open naviki.org, login, copy the value of the Authorization header in the browser dev tools) oauth_token = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" +if oauth_token.startswith("Bearer "): + oauth_token = oauth_token[7:] # (optional) select which routes to export route_types = "routedAll,recordedMy,recordedOthers" # GPX files will be saved in this directory