You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've moved to 2.0.0 some time ago, and I'm aware that browser login is utilized to create a cookiejar for python-myfitnesspal use.
However, what's the best way to ensure continued use if (for example) this is deployed on a headless machine?
So far I've solved it by creating a script that generates a cookie jar by pickle.dump(client.session.cookies,filehandler) to dump the cookiejar to file, and myfitnesspal.Client(cookiejar=jar) on the other side to load and unpickle the cookiejar from file.
That being said, I'm still getting frequent auth issues...is there any way to extend login session time? Thanks and a happy new year!
This discussion was converted from issue #149 on January 05, 2023 00:41.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've moved to 2.0.0 some time ago, and I'm aware that browser login is utilized to create a cookiejar for python-myfitnesspal use.
However, what's the best way to ensure continued use if (for example) this is deployed on a headless machine?
So far I've solved it by creating a script that generates a cookie jar by
pickle.dump(client.session.cookies,filehandler)to dump the cookiejar to file, andmyfitnesspal.Client(cookiejar=jar)on the other side to load and unpickle the cookiejar from file.That being said, I'm still getting frequent auth issues...is there any way to extend login session time? Thanks and a happy new year!
Beta Was this translation helpful? Give feedback.
All reactions