Open ghost opened 10 years ago
3 seconds of sleeping isn't long enough. Just tested it.
Maybe the script should have an option. Then the users can set the delay themselves and experiment.
FWIW, 10 seconds didn't work for me either.
Interesting... How about making the script a bit more intelligent with the delay? Maybe catch the connection error and then increment the delay until the connection succeeds again.
Interesting idea. I was also thinking about randomizing the delay a bit. I don't know if the API 403s if it notices there are 10 requests in a row with identical frequency.
After exporting 18 workouts out of a total of 171 the script failed with a 403 error from the endomondo server. I suppose they have some scraping detection running, so in my local version i added a time.sleep(10) in the for loop and the accompanying import time at the top of export.py. It seems to run fine now. More patience is needed, but the 10 second sleep might be too generous. Further experimentation should be done.