-
Notifications
You must be signed in to change notification settings - Fork 525
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
Adds support for www.grandfrais.com #912
Conversation
Thank you @xunleii for contributing! I've been reviewing this and will add a few comments now. |
for fraction, replacement in FRACTIONS.items(): | ||
ingredients = [i.replace(fraction, str(replacement)) for i in ingredients] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems OK; I'm wondering whether we should create a utility function that can do this. But perhaps not until there are multiple places that do this kind of remapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised it hadn't been used before for other websites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be interesting to try moving it into the normalize_string
method, and then to run the unit tests to see how many sites are affected.
I don't think we've had any complaints about the library returning fractions from sites before, though, so I suppose people are (mostly?) OK with it so far.
Signed-off-by: Alexandre Nicolaie <alexandre.nicolaie@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me - thanks again @xunleii. I'll likely merge this within the next day or so.
This functionality has been included in version 14.52.0 of the library - thank you, @xunleii! |
Grand Frais is a French supermarket specializing in fresh produce and world groceries, and offers recipes on its website (https://www.grandfrais.com/recettes/)