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

add jocooks.com scraper #1134

Merged
merged 9 commits into from
Jun 3, 2024
Merged

add jocooks.com scraper #1134

merged 9 commits into from
Jun 3, 2024

Conversation

Mooree003
Copy link
Contributor

This is a PR for recipe-scrapers to include recipes from jocooks. There was full schema support except for ingredient groups which had to be configured manually.

Resolves #1129

@jayaddison
Copy link
Collaborator

This generally looks good to me, thank you @Mooree003!

Out of interest: for the ingredient_groups implementation: we have some scrapers (rainbowplantlife.py, vanillaandbean.py for example) that query similar-looking HTML elements using a group_ingredients utility function that can make the code more concise: do you know whether that approach would be re-usable here?

Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
@Mooree003
Copy link
Contributor Author

This generally looks good to me, thank you @Mooree003!

Out of interest: for the ingredient_groups implementation: we have some scrapers (rainbowplantlife.py, vanillaandbean.py for example) that query similar-looking HTML elements using a group_ingredients utility function that can make the code more concise: do you know whether that approach would be re-usable here?

The only reason was in another scraper i created this method seemed to not work as intended so I reused my previous method however the group_ingredients works for this scraper so I will add this now

@jayaddison
Copy link
Collaborator

Thanks @Mooree003!

From some testing here: the cooking_method and equipment methods are not available on the SchemaOrg class, so we can't use those by calling self.schema.<method-name>(). I would recommend either removing them, or retrieving the data from the HTML where possible.

And a question / optional feature request: it looks like the recipe webpage includes nutritional info in the schema.org metadata, so that would be a nice bonus if we can include that too.

@Mooree003
Copy link
Contributor Author

Thanks @Mooree003!

From some testing here: the cooking_method and equipment methods are not available on the SchemaOrg class, so we can't use those by calling self.schema.<method-name>(). I would recommend either removing them, or retrieving the data from the HTML where possible.

And a question / optional feature request: it looks like the recipe webpage includes nutritional info in the schema.org metadata, so that would be a nice bonus if we can include that too.

Interesting I thought I removed these 😂. I'll add the nutritional info and remove the functions

@jayaddison
Copy link
Collaborator

👍 all looks good to me...

...but I'm going to add one more suggestion, because even though equipment isn't available through SchemaOrg, there is some equipment info in the HTML, and it's not too tricky to extract. Hold on for a moment and I'll add a couple of code review comments to do that.

@Mooree003
Copy link
Contributor Author

👍 all looks good to me...

...but I'm going to add one more suggestion, because even though equipment isn't available through SchemaOrg, there is some equipment info in the HTML, and it's not too tricky to extract. Hold on for a moment and I'll add a couple of code review comments to do that.

No worries! Added now

recipe_scrapers/jocooks.py Outdated Show resolved Hide resolved
recipe_scrapers/jocooks.py Show resolved Hide resolved
@Mooree003
Copy link
Contributor Author

changes addressed

@jknndy
Copy link
Collaborator

jknndy commented Jun 3, 2024

@Mooree003 , looks great thanks! merging now

@jknndy jknndy merged commit eec6454 into hhursev:main Jun 3, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Add] jocooks.com
3 participants