From b46e9b7f4d7e43ec873c797efd1dc9bb6b82650b Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Tue, 12 Mar 2024 13:30:33 -0300 Subject: [PATCH] Update strava_auth.py --- strava_auth.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/strava_auth.py b/strava_auth.py index c6bf735..6cae8f8 100644 --- a/strava_auth.py +++ b/strava_auth.py @@ -89,18 +89,18 @@ def do_GET(self): self.wfile.write(six.b("Access token obtained successfully

")) self.wfile.write(six.b("")) with open('%s/strava_token.txt' % SCRIPT_DIR, 'w') as f: - f.write(self.server.client_id + '\n'); - f.write(self.server.client_secret + '\n'); - f.write(access_token + '\n'); - f.write(refresh_token + '\n'); - f.write(str(expires_at) + '\n'); + f.write(str(self.server.client_id) + '\n') + f.write(self.server.client_secret + '\n') + f.write(access_token + '\n') + f.write(refresh_token + '\n') + f.write(str(expires_at) + '\n') else: self.server.logger.error("No code param received.") self.wfile.write(six.b("ERROR: No code param recevied.\n")) else: url = client.authorization_url(client_id=self.server.client_id, redirect_uri='http://localhost:{}/authorization'.format(self.server.server_port), - scope='activity:write') + scope=['activity:write']) self.send_response(302) self.send_header(six.b("Content-type"), six.b("text/plain")) @@ -128,7 +128,7 @@ def main(port, client_id, client_secret): action='store', type=int, default=8000) parser.add_argument('--client-id', help='Strava API Client ID', - action='store', default='28117') + action='store', default=28117) parser.add_argument('--client-secret', help='Strava API Client Secret', action='store', default='41b7b7b76d8cfc5dc12ad5f020adfea17da35468') args = parser.parse_args()