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

Ingredient grouping support for recipetineats #1377

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipe_scrapers/recipetineats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from ._abstract import AbstractScraper
from ._grouping_utils import group_ingredients


class RecipeTinEats(AbstractScraper):
@classmethod
def host(cls):
return "recipetineats.com"

def ingredient_groups(self):
return group_ingredients(
self.ingredients(),
self.soup,
".wprm-recipe-ingredient-group h4",
".wprm-recipe-ingredient",
)
37 changes: 37 additions & 0 deletions tests/test_data/recipetineats.com/recipetineats_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"author": "Nagi",
"canonical_url": "https://www.recipetineats.com/crispy-potato-straws-pommes-paille/",
"site_name": "RecipeTin Eats",
"host": "recipetineats.com",
"language": "en-US",
"title": "Crispy potato straws (Pommes Paille)",
"ingredients": [
"1 potato ((Aus: Sebago, US: russet, UK: Maris Piper), or other starchy or all-rounder potato (Note 1))",
"1 1/2 - 2 cups vegetable oil ((canola, sunflower or peanut oil))",
"Sea salt flakes (, crushed with fingers into a powder)"
],
"instructions_list": [
"Shred - Finely julienne the potato using a julienne mandoline, 2-4 mm / 1/16 - 1/8\" thick. (Note 2)",
"Rinse - Place potato in a bowl of water and rinse, changing the water as needed, until the water is clear. Drain in a colander. (Potato can be kept in water overnight in the fridge).",
"Dry - Spread on tea towels then pat dry. If time permits, spread out and air dry for 1 hour+. (Drier potato = less oil bubbling + crispier fries).",
"Heat the oil in a saucepan over high heat to 180°C/350°F, ensuring there is 10 cm/4\" clearance above the oil surface (the oil bubbles up).",
"Add potato into oil - SLOWLY scatter potato across the surface of the oil (don't dump in once place). ⚠️The oil will bubble up to ~7cm/3\", so add potato slowly, and you can pause until the bubbles subside before adding more. (Note 3 for cooking tips)",
"Fry for 1 1/2 - 2 minutes, using chopsticks (or similar) to stir once or twice. Once light golden and crisp, scoop out and drain on paper towels. (It goes more golden as it drains). Repeat with remaining potato.",
"Season - Carefully slide the fries into a bowl. Sprinkle with salt and gently toss. Serve immediately while warm, or cool.",
"Serve in bowls for munching, as a garnish like for Beef Tataki or serve a mound alongside a juicy steak or other protein (see in post for more ideas)."
],
"category": "Sides",
"yields": "1 serving",
"description": "Recipe video above. 1 x 300g/10oz potato will make about 3 heaped cups of fries (lightly packed).",
"total_time": 20,
"cook_time": 10,
"prep_time": 10,
"cuisine": "French",
"image": "https://www.recipetineats.com/tachyon/2024/07/Crispy-potato-straws-Pommes-Paille_6.jpg",
"keywords": [
"matchstick fries",
"pommes pailles",
"potato straws",
"shoestring fries"
]
}
Loading
Loading