Skip to content
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

Unable to find my packager code with get_packaging_codes() #66

Closed
A1CY0N opened this issue Oct 23, 2020 · 2 comments
Closed

Unable to find my packager code with get_packaging_codes() #66

A1CY0N opened this issue Oct 23, 2020 · 2 comments
Labels

Comments

@A1CY0N
Copy link

A1CY0N commented Oct 23, 2020

Some packaging code existing on the web interface is not returned by the get_packaging_codes() function which obviously uses this url.

An example here: https://world.openfoodfacts.org/product/6842420174016/chocolat. The packaging code is EMB 07113Y but it does not appear in the list of packaging codes.

Moreover, I have the impression that the terms packaging_code, packager_code and emb_code that we find indistinctly in the doc design the same thing.

@A1CY0N
Copy link
Author

A1CY0N commented Oct 24, 2020

As mentioned here openfoodfacts/openfoodfacts-server#4405, it would be interesting to implement a filter on the get_packaging_codes() function to reduce results and avoid limitations on the 10000 results.

@astagi
Copy link
Member

astagi commented Dec 15, 2020

@A1CY0N sorry for the late reply. Now you can accomplish your filtering using

codes = openfoodfacts.facets.get_packaging_codes(
    parameters={'filter': 'emb'}
)

For now the fix is on master, let me know if it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants