Login now includes a hidden captcha that prevents python-myfitnesspal from logging-in
See original GitHub issueIssue Description
Morning,
I wonder if something API-side has changed? Up to last night I was connecting fine, now this:
Traceback (most recent call last):
File "/home/andy/MFP/importmyfitnesspal.py", line 19, in <module>
client = myfitnesspal.Client('############', password='###################')
File "/usr/local/lib/python3.10/dist-packages/myfitnesspal/client.py", line 80, in __init__
self._login()
File "/usr/local/lib/python3.10/dist-packages/myfitnesspal/client.py", line 132, in _login
raise MyfitnesspalLoginError()
Any thoughts?
Issue Analytics
- State:
- Created 6 months ago
- Reactions:3
- Comments:11 (2 by maintainers)
Top Results From Across the Web
python-myfitnesspal/changelog.markdown at master
Now uses the browser_cookie3 library for gathering log in credentials ... to the recent addition of a hidden captcha in the log-in flow...
Read more >python - Trying to log in to MyFitnessPal via requests
Try this: r = requests.get('https://www.myfitnesspal.com/account/login', auth= ('email', 'password')). I got a 200 response wit this.
Read more >Recaptcha is not working for myfitnesspal.com
The recaptcha will not complete on myfitnesspal.com. ... Go to myfitnesspal.com; Attempt to log in; The recaptcha fails.
Read more >eKP - River Thames Conditions - Environment Agency - GOV.UK
#bachdim Alkaan, Paris sg malmo, Chill out mix download free, Natalia ginzburg interview, Emevi camisinin son hali, Chi5 chayeb mp3, 56 minutes from...
Read more >Untitled
Susanne iwarsson, 4-14-1 formation, Victim 2011 film cast, Cmake if string contains, It audit vs risk assessment, Stefan raab markus kuhn, Federacion golf ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK… good and bad news!
The good news is that I’ve updated this library such that it’s again able to access MyFitnessPal on your behalf. You can find those changes in version 2.0.0 of this library.
The bad news is that, as you might guess from the major version bump, the way we access login credentials had to be changed in ways that may limit how useful this library is to you. I’m really sorry about that, but I don’t see an alternative at the moment.
Now that MyFitnessPal has added a hidden captcha to their log in flow, this library will no longer be able to log in directly in the manner it was historically doing so. Instead, this library now uses the browser_cookie3 library for gathering cookies from your local browser for use when interacting with MyFitnessPal.
To be a little more concrete:
If any of you have any clever ideas of other ways of getting around this limitation, I’d love to hear them!
Cheers & good luck!
You can absolutely instantiate your own cookiejar and hand it directly to
myfitnesspal.Client
– just import the class fromhttp.cookiejar.CookieJar
and set the cookies you need. See thecookiejar
parameter on the client here: https://python-myfitnesspal.readthedocs.io/en/latest/api/client.html.Unfortunately, though, you’re still going to need to log-in in an actual browser somewhere to find your session token given that the log-in flow has that invisible captcha. There is unfortunately no avenue forward via which we can return to accepting a username/password combination directly as we were before while a captcha is present.