New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Nutrional Data #241
Comments
I have no objections. It seems as though the first two are schema formats so it'd make sense to just expand our schema parser. For something like that table I'm not aware if there's a standard. I'm guessing we'd just add a |
That sounds reasonable. Implementing the standard schema format version first sounds like a great plan. I can try to take this on unless someone else wants to do it since it is the core parser. |
I don't think anyone has |
I second the nutritional data idea and will help to implement if needed 😉
As for the table format and HTML parsing - nutrition to the respective scraper class (in follow-up PR) 👍 I won't be able to work on the project this week so we won't duplicate work 😉 |
This is a great idea for the library 👍 Although I think you should lead with your preferred design @ptindall, as a user I can offer a preference for the results of the To phrase that idea another way: in client code it's always possible to call |
Something to keep in mind is how we handle units. Obviously, this doesn't need to be in the first iteration of the feature, but some recipes might support both metric and imperial units or only one. Something akin to I'm just brainstorming so no body should feel obligated to implement this. Heck, I might do it myself once the initial feature is out 😉 |
Any update? |
No update here @arthur-fontaine. I'll ping you when nutrition-related functionality is added. 🙂 |
@arthur-fontaine, thanks to @bluhmr and @sloanemk, starting from version 11.0.0 we have .nutrients() method that works just fine if nutrients data is included in the Recipe Schema on the site it is fetched from. |
This is awesome!!! I was going to start looking at this feature this
weekend, but now I can actually focus on using the nutrition data. Big
thanks to thanks to @bluhmr <https://github.com/bluhmr> and @sloanemk
<https://github.com/sloanemk> for pushing this through.
…On Thu, Dec 17, 2020 at 5:46 PM hhursev ***@***.***> wrote:
@arthur-fontaine <https://github.com/arthur-fontaine>, thanks to @bluhmr
<https://github.com/bluhmr> and @sloanemk <https://github.com/sloanemk>,
starting from version 11.0.0
<https://github.com/hhursev/recipe-scrapers/tree/11.0.0> we have
.nutrients() method that works just fine if nutrients data is included in
the Recipe Schema on the site it is fetched from.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKNIJDIYD2JMQRUHFJQLYDSVKJ6LANCNFSM4SMBF2PQ>
.
|
@hhursev Has this feature been removed or something? |
It's not removed but rather not all recipe sites have nutrients data. The following sites should support nutrients with recipe-scrapers:
As well as others. If you run the package with the default configuration the However, this package leans on data being available on the site it's scraping from. So high chance there's no nutrients data available to begin with. That being said nutrients data is a broader topic. In my opinion worthy of a separate package with it's own database (or using myfitnesspal API or sth). Package that normalizes the quantities and calculates nutrients based on the given ingredients alone. Something I'd like to tackle but also not on my radar for the next months to come. The .nutrients() method in this package may not be your thing - depends on what you intend to do with the data. |
Has there ever been any discussion about supporting nutritional data if it is available?
I have seen several websites implement it and would love to have that data as part of the scraping. Here is a snippet of the data available on innit.com as part of the recipe schema.
Another from whole foods:
And from HEB, we have a table based structure:
The text was updated successfully, but these errors were encountered: