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

Import Recipes from Cookidoo #1552

Open
codac opened this issue Feb 18, 2022 · 12 comments
Open

Import Recipes from Cookidoo #1552

codac opened this issue Feb 18, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@codac
Copy link

codac commented Feb 18, 2022

Is your feature request related to a problem? Please describe.

Add Integration for importing recipes from Cookidoo (https://cookidoo.de/). A payed account is required.
Maybe the technique of https://github.com/auino/cookidump can be reused.

Describe the solution you'd like

I would like to be able to import recipes from cookidoo directly into Tandoor Recipes using the import functionality of integrations.

Describe alternatives you've considered

/

Additional context

No response

@codac codac added the enhancement New feature or request label Feb 18, 2022
@vabene1111
Copy link
Collaborator

have you tried using the bookmarklet ?

@codac
Copy link
Author

codac commented Feb 21, 2022

No I didn't is there a documentation available?

@vabene1111
Copy link
Collaborator

sadly not but i am building some into the application currently. Basically drag the "bookmak me" button on the import page into your bookmarks, open a cookiedoo recipe and click on the bookmark and see if that works. (might only work in chrome)

@Tuphal
Copy link

Tuphal commented Feb 25, 2022

I have no problems with importing the repices from cookidoo. I do so for the last 6 month with all my favorites:

grafik

@vabene1111
Copy link
Collaborator

@Tuphal using the bookmarklet or URL directly ?

@Tuphal
Copy link

Tuphal commented Feb 25, 2022

copying the URL directly.
But I need use the manual selection and editing, because the crawler is not getting the description of the steps, just the ingredience.

@cmro
Copy link

cmro commented Feb 25, 2022

Maybe not the most elegant solution, but what also works is to copy the source code of the cookidoo page and paste it under import/source. This way also the steps are imported. Only cookidoo specific emojis (e.g. rewind) are not imported correctly.

@vabene1111
Copy link
Collaborator

that works or just using the bookmarklet (which does nothing different than copy the code and move it to the importer). I will test this myself once i am done refactoring the url import page

@cmro
Copy link

cmro commented Feb 26, 2022

I can confirm that the bookmarklet works (even in Firefox), but you have to make sure that your tandoor instance is running on https, otherwise it does nothing (I guess that's some kind of cross-site-script protection). Also, you have to allow popups for cookidoo.de

Some smaller issues:

  • As already mentioned, some thermomix specific emojis are not translated correctly (e.g the dough mode becomes , stir:  and so on). I suspect they use symbols that are only available in their own font. This sometimes leads to results that are difficult to read, however, this will probably be difficult to fix.
  • Additional sections (Necessary accessories, Tips & Tricks) are not imported. This would certainly be nice to have.

@vabene1111
Copy link
Collaborator

thanks for the feedback. We would need to look at the source but i think both issues can likely be resoved by writing a custom parser for cookiedoo. maybe even directly contribute that back to recipe scrapers library

@MarcusWolschon
Copy link
Contributor

MarcusWolschon commented Jul 9, 2022

* As already mentioned, some thermomix specific emojis are not translated correctly (e.g the dough mode becomes , stir:  and so on). I suspect they use symbols that are only available in their own font. This sometimes leads to results that are difficult to read, however, this will probably be difficult to fix.

Already implemented back in January here.
MarcusWolschon#12
MarcusWolschon#7

Specifically here:
MarcusWolschon@2d3674f

@MarcusWolschon
Copy link
Contributor

MarcusWolschon commented Dec 28, 2022

I just made a pull request of the requested parser including

  • special handling for replacing the custom emoji Cookiedoo uses for Thermomix-specific buttons with translated strings
  • handling of complex recipes with named sections.
  • handling of recipe steps as tandoor steps

Possible unit test cases can be found here
https://github.com/MarcusWolschon/AdvancedRecipes/blob/release/latest/cookbook/tests/other/test_data/cookidoo.html
https://github.com/MarcusWolschon/AdvancedRecipes/blob/release/latest/cookbook/tests/other/_recipes.py#L2812

MarcusWolschon added a commit to MarcusWolschon/AdvancedRecipes that referenced this issue Jan 13, 2023
MarcusWolschon added a commit to MarcusWolschon/AdvancedRecipes that referenced this issue Jan 13, 2023
MarcusWolschon added a commit to MarcusWolschon/AdvancedRecipes that referenced this issue Jan 13, 2023
MarcusWolschon added a commit to MarcusWolschon/AdvancedRecipes that referenced this issue Jan 13, 2023
MarcusWolschon added a commit to MarcusWolschon/AdvancedRecipes that referenced this issue Jan 15, 2023
… and move Thermomix-Handling to clean_instruction_string()
vabene1111 added a commit that referenced this issue Mar 25, 2023
…mport_Recipes_from_Cookidoo

#1552 import recipes from cookidoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants