From 9e0c6e2240ccdb3314ca244ffeed108c5b6f30ab Mon Sep 17 00:00:00 2001 From: yihong Date: Wed, 11 Oct 2023 18:16:24 +0800 Subject: [PATCH] fix: #516 (#517) --- run_page/garmin_sync.py | 8 +------- v2.0_TODO.md | 8 -------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 v2.0_TODO.md diff --git a/run_page/garmin_sync.py b/run_page/garmin_sync.py index 0ec58e2707e..1c06cd21fe1 100755 --- a/run_page/garmin_sync.py +++ b/run_page/garmin_sync.py @@ -5,7 +5,6 @@ import argparse import asyncio -import json import logging import os import sys @@ -27,24 +26,19 @@ TIME_OUT = httpx.Timeout(240.0, connect=360.0) GARMIN_COM_URL_DICT = { - "BASE_URL": "https://connectapi.garmin.com", "SSO_URL_ORIGIN": "https://sso.garmin.com", "SSO_URL": "https://sso.garmin.com/sso", - # "MODERN_URL": "https://connect.garmin.com/modern", "MODERN_URL": "https://connectapi.garmin.com", "SIGNIN_URL": "https://sso.garmin.com/sso/signin", - "CSS_URL": "https://static.garmincdn.com/com.garmin.connect/ui/css/gauth-custom-v1.2-min.css", "UPLOAD_URL": "https://connectapi.garmin.com/upload-service/upload/", "ACTIVITY_URL": "https://connectapi.garmin.com/activity-service/activity/{activity_id}", } GARMIN_CN_URL_DICT = { - "BASE_URL": "https://connectapi.garmin.cn", "SSO_URL_ORIGIN": "https://sso.garmin.com", "SSO_URL": "https://sso.garmin.cn/sso", "MODERN_URL": "https://connectapi.garmin.cn", "SIGNIN_URL": "https://sso.garmin.cn/sso/signin", - "CSS_URL": "https://static.garmincdn.cn/cn.garmin.connect/ui/css/gauth-custom-v1.2-min.css", "UPLOAD_URL": "https://connectapi.garmin.cn/upload-service/upload/", "ACTIVITY_URL": "https://connectapi.garmin.cn/activity-service/activity/{activity_id}", } @@ -143,7 +137,7 @@ async def upload_activities_original(self, datas, use_fake_garmin_device=False): try: res = await self.req.post( - self.upload_url, files=files, headers={"nk": "NT"} + self.upload_url, files=files, headers=self.headers ) os.remove(data.filename) f.close() diff --git a/v2.0_TODO.md b/v2.0_TODO.md deleted file mode 100644 index 67f1698d8a6..00000000000 --- a/v2.0_TODO.md +++ /dev/null @@ -1,8 +0,0 @@ -- [ ] refactor python code -- [ ] PyPI -- [ ] TUI -- [ ] refactor frontend code to `next.js` -- [ ] better data show -- [ ] bright theme -- [ ] garmin to garmin -- [ ] datatype can change `gpx` `fix` `tcx`