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

Python 3 compatibility fix #14

Closed ebrensi closed 8 years ago

ebrensi commented 8 years ago

I reworked gcexport.py to use the requests library instead of urllib and some other stuff, and made PEP fixes for readability. Also I changed the output from standard print function output to proper logging, making it easy to write to a log file.

The requests library automatically uses logger functionality, so http request activity is logged at the DEBUG level. All of the standard output goes to INFO log level.

This script works the same as it did before and can be substituted into any existing projects. I've tested it with gpx, tcx, and "original" file output (both zipped and unzipped into fit files).