yannickcarer / endomondo-export

Export the most recent Endomondo workouts as TCX files.
31 stars 21 forks source link

maxResults > 650 fails #3

Open appsforartists opened 10 years ago

appsforartists commented 10 years ago

http://api.mobile.endomondo.com/mobile/api/workout/list?authToken=XXXXXX&language=EN&maxResults=650 works OK, but going much higher than that results in an empty response, which causes requests to retry until in ultimately crashes with

requests.exceptions.ConnectionError: HTTPConnectionPool(host='api.mobile.endomondo.com', port=80): Max retries exceeded with url: /mobile/api/workout/list?authToken=XXXXXXXX&language=EN&maxResults=900 (Caused by <class 'httplib.BadStatusLine'>: '')

It would be nice to know how pagination works in this API, so we could teach the app to request multiple 650-item-long pages.

CountablyInfinite commented 4 years ago

I added some small improvements, including a workaround to download more than 500 workouts, to this script, since i don't think the DEV is active on Github anymore and endomondo is closing it's doors by the end of 2020. Maybe this solves your problem. #10