coddingtonbear / python-myfitnesspal

Access your meal tracking data stored in MyFitnessPal programatically
MIT License
794 stars 138 forks source link

Fixed _get_numeric() with empty strings #38

Closed bcongdon closed 8 years ago

bcongdon commented 8 years ago

Addresses symptom of #37. (Though, root cause is fixed by #36)

Still, I think it's reasonable that _get_numeric() not fail on missing data. Up to the maintainers if they want to merge this.

coddingtonbear commented 8 years ago

I'm afraid I'm not sure this is the right answer, here :frowning:. If we are attempting to fetch a numeric value from some part of the page, and the text part of that page is empty, we probably want an exception to be raised so we can identify the difference between the value actually being zero, and our scraping code having an error.

Would you find it in your heart to forgive me, @bcongdon, were I not to merge this? Feel free to make a case, too, if you think I'm leaning the wrong way on this issue.

bcongdon commented 8 years ago

Yup, totally OK with that.

Thanks for this great module!