kjkjava / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
314 stars 134 forks source link

fixing http status 410 on downloading gpx or tcx #27

Open ocramleznem opened 7 years ago

ocramleznem commented 7 years ago

While trying to download my activies in gpx or tcx I got the following message:

python gcexport.py --username bla --password blub -c all -f gpx -d 20170125 
Welcome to Garmin Connect Exporter!
Garmin Connect activity: [1540797151] Blubber
    Di, 2017 Jan 24 17:58, 00:28:28, 5,01 Kilometer
    Downloading file...
Traceback (most recent call last):
  File "gcexport.py", line 231, in <module>
    raise Exception('Failed. Got an unexpected HTTP error (' + str(e.code) + ').')
Exception: Failed. Got an unexpected HTTP error (410).

Doing some research I found out that the download URLs have changed. This PR will fix it.

jorgenbs commented 7 years ago

For me it needs to be

url_gc_gpx_activity = 'https://connect.garmin.com/modern/proxy/download-service/export/gpx/activity/'
url_gc_tcx_activity = 'https://connect.garmin.com/modern/proxy/download-service/export/tcx/activity/'