Skip to content

What's the best way to persist programmatic access to myfitnesspal? #149

@dkvdm

Description

@dkvdm

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions