Skip to content

Commit

Permalink
Add scraper for smulweb.nl (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Oct 28, 2022
1 parent 46d6757 commit 2e7d0e1
Show file tree
Hide file tree
Showing 4 changed files with 2,287 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipe_scrapers/__init__.py
Expand Up @@ -177,6 +177,7 @@
from .simplyrecipes import SimplyRecipes
from .simplywhisked import SimplyWhisked
from .skinnytaste import SkinnyTaste
from .smulweb import Smulweb
from .southernliving import SouthernLiving
from .spendwithpennies import SpendWithPennies
from .springlane import Springlane
Expand Down Expand Up @@ -406,6 +407,7 @@
SimplyRecipes.host(): SimplyRecipes,
SimplyWhisked.host(): SimplyWhisked,
SkinnyTaste.host(): SkinnyTaste,
Smulweb.host(): Smulweb,
SouthernLiving.host(): SouthernLiving,
SpendWithPennies.host(): SpendWithPennies,
Springlane.host(): Springlane,
Expand Down
48 changes: 48 additions & 0 deletions recipe_scrapers/smulweb.py
@@ -0,0 +1,48 @@
# mypy: allow-untyped-defs

import re

from ._abstract import AbstractScraper


class Smulweb(AbstractScraper):

instruction_delimiter = re.compile(r"(\.|\))\s*([A-Z])")

@classmethod
def host(cls):
return "smulweb.nl"

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

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

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

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):
schema_instructions = self.schema.instructions()
return self.instruction_delimiter.sub(r"\1\n\2", schema_instructions)

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

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

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

0 comments on commit 2e7d0e1

Please sign in to comment.