Last active
December 2, 2019 03:20
-
-
Save trbarron/9567adde3a18ca53616ef3ef2860569d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
import peloton | |
username = "username_1" | |
workouts = peloton.PelotonWorkout.list() | |
with open(username+".pkl","wb") as f: | |
pickle.dump(workouts,f) | |
pkl_file = open(username + '.pkl', 'rb') | |
workouts_as_loaded = pickle.load(pkl_file) | |
latest_workout = workouts_as_loaded[0] | |
print(latest_workout.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment