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 fifteenspatulas.com parser #176

Merged
merged 6 commits into from
Jul 4, 2020
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
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Scrapers available for:
- `https://en.wikibooks.org/ <https://en.wikibooks.org>`_
- `https://delish.com/ <https://delish.com>`_
- `https://epicurious.com/ <https://epicurious.com>`_
- `https://fifteenspatulas.com/ <https://www.fifteenspatulas.com/>`_
- `https://finedininglovers.com/ <https://www.finedininglovers.com>`_
- `https://fitmencook.com/ <https://www.fitmencook.com>`_
- `https://food.com/ <https://www.food.com>`_
Expand Down
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .cybercook import Cybercook
from .delish import Delish
from .epicurious import Epicurious
from .fifteenspatulas import FifteenSpatulas
from .finedininglovers import FineDiningLovers
from .fitmencook import FitMenCook
from .food import Food
Expand Down Expand Up @@ -93,6 +94,7 @@
Cybercook.host(): Cybercook,
Delish.host(): Delish,
Epicurious.host(): Epicurious,
FifteenSpatulas.host(): FifteenSpatulas,
FineDiningLovers.host(): FineDiningLovers,
FitMenCook.host(): FitMenCook,
Food.host(): Food,
Expand Down
28 changes: 28 additions & 0 deletions recipe_scrapers/fifteenspatulas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from ._abstract import AbstractScraper


class FifteenSpatulas(AbstractScraper):
@classmethod
def host(cls):
return "fifteenspatulas.com"

def title(self):
return self.schema.title()

def total_time(self):
return self.schema.total_time()

def yields(self):
return self.schema.yields()

def image(self):
return self.schema.image()

def ingredients(self):
return self.schema.ingredients()

def instructions(self):
return self.schema.instructions()

def ratings(self):
return self.schema.ratings()
157 changes: 157 additions & 0 deletions tests/test_data/fifteenspatulas.testhtml

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions tests/test_fifteenspatulas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from tests import ScraperTest

from recipe_scrapers.fifteenspatulas import FifteenSpatulas


class TestFifteenSpatulasScraper(ScraperTest):

scraper_class = FifteenSpatulas

def test_host(self):
self.assertEqual("fifteenspatulas.com", self.harvester_class.host())

def test_title(self):
self.assertEqual(
self.harvester_class.title(), "Orange Creme Brulee",
)

def test_yields(self):
self.assertEqual("6 serving(s)", self.harvester_class.yields())

def test_image(self):
self.assertEqual(
"https://www.fifteenspatulas.com/wp-content/uploads/2019/05/Orange-Creme-Brulee-Fifteen-Spatulas-16.jpg",
self.harvester_class.image(),
)

def test_ingredients(self):
self.assertCountEqual(
[
"zest of 4 oranges ((about 2 tsp))",
"3 cups heavy cream",
"5 large egg yolks",
"1/2 cup sugar +1 tsp for each crème brûlée",
"1 tsp vanilla extract",
],
self.harvester_class.ingredients(),
)

def test_instructions(self):
return self.assertEqual(
"""Combine the orange zest and cream in a saucepan, and let it sit in the fridge for 2 hours.
Preheat the oven to 300 degrees F.
Whisk together the egg yolks and 1/2 cup sugar for 1 minute, until well blended.
Heat the orange zest cream over medium high heat until 180F, bringing it almost to a boil, but not quite. You’ll know when bubbles begin forming on the side, but it&#x27;s best to use a thermometer.
While whisking constantly, slowly dribble the hot cream into the egg yolk mixture, gradually over a minute.
Add the vanilla, then pour the mixture through a sieve to strain out the orange zest and any coagulated egg.
Pour the strained custard into six 4-ounce ramekins until nearly full (you may use other size ramekins, but you&#x27;ll need to adjust bake time).
Place the ramekins in a large baking pan and add enough boiling water to come halfway up the outsides of the ramekins.
Bake for 35-40 minutes, until the creme brulees jiggle slightly when shaken, and have set. Take the ramekins out of the water bath and let cool to room temperature. Then cover the tops with plastic wrap and refrigerate until they firm up, 4-6 hours.
When you’re ready to serve the creme brulee, sprinkle 1 tsp of sugar evenly on top of each one.
Ideally, use a blowtorch to quickly caramelize the tops of each creme brulee, and serve immediately. This will give you the crunchy top layer you want, while keeping the creme brulee from getting warm.
If you don&#x27;t have a torch, you can use the broiler of your oven to caramelize the top. Set the oven rack as close as possible to the broiler, and preheat to high. Place the ramekins on a sheet pan, and broil for 1-2 minutes, until the top caramelizes, making sure you keep your eye on the browning (it&#x27;s easier to burn the sugar using the broiler). Serve promptly and enjoy!""",
self.harvester_class.instructions(),
)