Skip to content

Commit

Permalink
adds support for StacyLing (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy authored Dec 27, 2024
1 parent fd20330 commit 576f46a
Show file tree
Hide file tree
Showing 7 changed files with 3,951 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ Scrapers available for:
- `https://spainonafork.com/ <https://spainonafork.com/>`_
- `https://spendwithpennies.com/ <https://spendwithpennies.com/>`_
- `https://www.springlane.de <https://www.springlane.de>`_
- `https://stacyling.com/ <https://stacyling.com/>`_
- `https://www.staysnatched.com/ <https://www.staysnatched.com/>`_
- `https://steamykitchen.com/ <https://steamykitchen.com>`_
- `https://streetkitchen.hu/ <https://streetkitchen.hu>`_
Expand Down
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
from .spainonafork import SpainOnAFork
from .spendwithpennies import SpendWithPennies
from .springlane import Springlane
from .stacyling import StacyLing
from .staysnatched import StaySnatched
from .steamykitchen import SteamyKitchen
from .streetkitchen import StreetKitchen
Expand Down Expand Up @@ -608,6 +609,7 @@
SavoryNothings.host(): SavoryNothings,
SheLikesFood.host(): SheLikesFood,
SpainOnAFork.host(): SpainOnAFork,
StacyLing.host(): StacyLing,
StrongrFastr.host(): StrongrFastr,
TasteAtlas.host(): TasteAtlas,
TheCookieRookie.host(): TheCookieRookie,
Expand Down
22 changes: 22 additions & 0 deletions recipe_scrapers/stacyling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from ._abstract import AbstractScraper
from ._utils import get_equipment


class StacyLing(AbstractScraper):
@classmethod
def host(cls):
return "stacyling.com"

def equipment(self):
equipment_container = self.soup.find(
"div", class_="wprm-recipe-equipment-container"
)
if not equipment_container:
return None
equipment_items = [
item.get_text()
for item in equipment_container.find_all(
"div", class_="wprm-recipe-equipment-name"
)
]
return get_equipment(equipment_items)
58 changes: 58 additions & 0 deletions tests/test_data/stacyling.com/stacyling_1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"author": "Stacy Ling",
"canonical_url": "https://stacyling.com/irish-cheddar-and-beer-fondue-recipe/",
"site_name": "Bricks 'n Blooms with Stacy Ling",
"host": "stacyling.com",
"language": "en-US",
"title": "Irish Cheddar and Beer Fondue Recipe",
"ingredients": [
"2 cups Small Red Potatoes (about 1-1.5 inches)",
"2 cups Broccoli Florets",
"2 cups Cauliflower Florets",
"3 Apples (Cored and Cut Into Wedges)",
"1 loaf Italian bread (long and skinny with hard exterior)",
"1 lb Irish Cheddar Cheese (Grated)",
"2.5 tbsp All Purpose Flour",
"3/4 - 1 cup Beer (Irish Stout is best)",
"6 tbsp Frozen Apple Juice Concentrate (Thawed)",
"1 tbsp Dijon Mustard"
],
"instructions_list": [
"Steam all veggies until tender for about 15 minutes.",
"Arrange vegetables and apples around edge of large platter.",
"Cut up bread into 1 - 1/5\" pieces so it's easy to dip in the fondue.",
"Toss cheese with flour in large bowl.",
"Bring 3/4 cup beer, juice concentrate and mustard to simmer in large saucepan over medium heat.",
"Gradually add cheese.",
"Stir constantly until cheese is smooth and melted. Add more stout to thin out if needed.",
"Season to taste with salt and pepper.",
"Transfer to fondue pot. Serve and enjoy!"
],
"category": "Appetizer",
"yields": "10 servings",
"description": "The Best Fondue Recipe You'll Ever Have",
"total_time": 60,
"cook_time": 30,
"prep_time": 30,
"cuisine": "Irish",
"ratings": 5.0,
"ratings_count": 1,
"nutrients": {
"servingSize": "1 grams",
"calories": "412 kcal",
"fatContent": "17 g",
"saturatedFatContent": "9 g",
"unsaturatedFatContent": "6 g",
"carbohydrateContent": "47 g",
"sugarContent": "10 g",
"proteinContent": "17 g",
"sodiumContent": "610 mg",
"fiberContent": "5 g",
"cholesterolContent": "45 mg"
},
"image": "https://stacyling.com/wp-content/uploads/2021/02/Irish-Cheddar-2-scaled.jpg",
"keywords": [
"Fondue Recipe",
"Irish Cheddar"
]
}
1,979 changes: 1,979 additions & 0 deletions tests/test_data/stacyling.com/stacyling_1.testhtml

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions tests/test_data/stacyling.com/stacyling_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"author": "Stacy Ling",
"canonical_url": "https://stacyling.com/christmas-charcuterie-board-wreath/",
"site_name": "Bricks 'n Blooms with Stacy Ling",
"host": "stacyling.com",
"language": "en-US",
"title": "Christmas Charcuterie Board Wreath: The Easy & Elegant Appetizer",
"ingredients": [
"1/2 pound Salami (thinly sliced)",
"1/2 pound Pepperoni (thinly sliced)",
"8 ounces Mozzarella cigliene",
"8 ounces Roasted Red Peppers",
"8 ounces Fontina Cheese (Diced )",
"8 ounces Cheddar Cheese (Diced)",
"8 ounces Dill Havarti (Diced)",
"8 ounces Black Olives",
"8 ounces Green Olives",
"4 ounces Mini Pickles",
"15 ounces Artichokes (Marinated)",
"8 ounces Cherry Tomatoes",
"Rosemary Sprigs"
],
"instructions_list": [
"Gather all of your antipasto ingredients",
"Prepare the cheeses and meats that need slicing or cubing.",
"Skewer ingredients onto large toothpicks. Avoid making them all the same so the charcuterie wreath doesn't look flat.",
"Then arrange the antipasto skewers into a wreath shape on a round platter or serving board in the shape of a wreath.",
"Tuck in rosemary sprigs to make it look like a Christmas wreath.",
"Store in the refrigerator until you are ready to serve guests."
],
"category": "Appetizer",
"yields": "12 servings",
"description": "Wow with a Christmas Charcuterie Board Wreath! This unique appetizer is festive, flavorful, and easy to enjoy.",
"total_time": 45,
"prep_time": 45,
"cuisine": "Italian",
"ratings": 5.0,
"ratings_count": 1,
"equipment": [
"Toothpicks Large, No colored wrappings",
"Knife"
],
"nutrients": {
"servingSize": "1 serving",
"calories": "401 kcal",
"fatContent": "33 g",
"saturatedFatContent": "14 g",
"unsaturatedFatContent": "17 g",
"transFatContent": "0.3 g",
"carbohydrateContent": "8 g",
"sugarContent": "1 g",
"proteinContent": "19 g",
"sodiumContent": "1884 mg",
"fiberContent": "4 g",
"cholesterolContent": "74 mg"
},
"image": "https://stacyling.com/wp-content/uploads/2023/11/Christmas-Charcuterie-Board-Wreath-5.jpg",
"keywords": [
"Antipasto Skewers",
"Christmas Charcuterie Board"
]
}
1,827 changes: 1,827 additions & 0 deletions tests/test_data/stacyling.com/stacyling_2.testhtml

Large diffs are not rendered by default.

0 comments on commit 576f46a

Please sign in to comment.