Git Product home page Git Product logo

polar-flow-export's People

Contributors

gabrielreid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

polar-flow-export's Issues

Multisport session's download URL doesn't work without zip

When trying to export session type of 'multisport' from Polar Flow the exporter throws error (400 bad request). That's due the download URL which is trying to download the plain tcx file. For some reason Flow provides only zipped version to be downloaded. So the issues lies on the line https://github.com/gabrielreid/polar-flow-export/blob/master/polarflowexport.py#L137 which has the 'false' in the URL.

How to get around? Read the response status code and try switching to zipped URL when 400. Or downloading all the sessions using zipped tcx files and unpacking them after download? The latter would be relatively easy to implement I guess. (Would try to fix a patch, but I'm limited with time at this moment)

PS. Huge thanks for this script - saved my day! Exporting the tcx files one by one (to be uploaded to TrainingPeaks) is pain in the ass.

"Exception: HTTP Error 400: Bad Request" at login

I'm getting this error when trying the script:

INFO:PolarFlowExporter:Logging in user [email protected]
ERROR:PolarFlowExporter:Error fetching https://flow.polar.com/login: HTTP Error 400: Bad Request
Traceback (most recent call last):
File "polarflowexport.py", line 158, in
for tcx_file in exporter.get_tcx_files(from_date_str, to_date_str):
File "polarflowexport.py", line 114, in get_tcx_files
self._login()
File "polarflowexport.py", line 101, in _login
email=self._username, password=self._password))
File "polarflowexport.py", line 92, in _execute_request
raise Exception(e)
Exception: HTTP Error 400: Bad Request`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.