solitone / josm_strava_cookies Goto Github PK
View Code? Open in Web Editor NEWUtility for setting Strava cookies in JOSM preferences
License: GNU General Public License v3.0
Utility for setting Strava cookies in JOSM preferences
License: GNU General Public License v3.0
Error messages should be directed to standard error, rather than standard output.
Currently bluered colour is used. At the moment other colours provide much more detail, so it would be useful that an option is offered in order to choose a different colour, e.g. hot.
Thanks so much for writing this tool! I find Strava's high-res heatmaps incredibly useful for mapping, yet the process of reading out cookie information is something that computers are much better at than humans... ๐ฅ
Having said that, I don't use Safari on my Mac if I can help it. I also use Linux machines. And Python2 is dying.
So, I had a crack at generalizing your software. I'll create two pull requests in a minute: one to allow Chrome and Firefox on OSX, the second porting everything to Python3. Expect a third PR soon, which should allow the tool to be run under Linux (if I understand correctly, this should be as easy as defining a new subclass in which the path to JOSM preferences is defined). More detail within the PRs. Let me know what you think!
First, thanks so much for writing this tool. I've grown very tired of manually doing this every 2 weeks, and was also thinking of a way to automate it.
Steps to Reproduce:
python upd_strava_prefs.py
Full error:
Traceback (most recent call last): File "upd_strava_prefs.py", line 12, in <module> stravaImgUpdater.getCookies() File "/Users/<user>/Development/josm_strava_cookies-master/stravaImgUpdater.py", line 54, in getCookies if (self.keyPairId == "" or self.policy == "" or self.signature == ""): AttributeError: MacOsStravaImgUpdater instance has no attribute 'keyPairId'
Python: 2.7.10
Safari: Version 12.0 (14606.1.36.1.9)
JOSM: 14824
JOSM Imagery: tms[3,15]:https://heatmap-external-{switch:a,b,c}.strava.com/tiles-auth/all/hot/{zoom}/{x}/{y}.png
They shouldn't contain any reference to icloud, since they can also be used under linux/windows.
I updated the scripts and ran it again. Now I get this error. I can confirm I did login in to Strava and the Stava Heatmap site, and check the Remember Me box. Despite that the script do es not pick a cookie to work with.
Error message I get:
"No Strava cookies found!
Open Safari, browse to the Strava Heatmap, and login with your Strava account."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.