Skip to content

Commit

Permalink
Adds support for fattoincasadabenedetta.it (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
jknndy authored Sep 23, 2023
1 parent d474c0c commit 24f0ea6
Show file tree
Hide file tree
Showing 5 changed files with 2,985 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Scrapers available for:
- `https://epicurious.com/ <https://epicurious.com>`_
- `https://www.errenskitchen.com/ <https://www.errenskitchen.com/>`_
- `https://recipes.farmhousedelivery.com/ <https://recipes.farmhousedelivery.com/>`_
- `https://www.fattoincasadabenedetta.it/ <https://www.fattoincasadabenedetta.it/>`_
- `https://fifteenspatulas.com/ <https://www.fifteenspatulas.com/>`_
- `https://finedininglovers.com/ <https://www.finedininglovers.com>`_
- `https://fitmencook.com/ <https://www.fitmencook.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 @@ -74,6 +74,7 @@
from .errenskitchen import ErrensKitchen
from .ethanchlebowski import EthanChlebowski
from .farmhousedelivery import FarmhouseDelivery
from .fattoincasadabenedetta import FattoInCasaDaBenedetta
from .fifteenspatulas import FifteenSpatulas
from .finedininglovers import FineDiningLovers
from .fitmencook import FitMenCook
Expand Down Expand Up @@ -350,6 +351,7 @@
ErrensKitchen.host(): ErrensKitchen,
EthanChlebowski.host(): EthanChlebowski,
FarmhouseDelivery.host(): FarmhouseDelivery,
FattoInCasaDaBenedetta.host(): FattoInCasaDaBenedetta,
FifteenSpatulas.host(): FifteenSpatulas,
FineDiningLovers.host(): FineDiningLovers,
FitMenCook.host(): FitMenCook,
Expand Down
48 changes: 48 additions & 0 deletions recipe_scrapers/fattoincasadabenedetta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# mypy: allow-untyped-defs

from ._abstract import AbstractScraper
from ._utils import normalize_string


class FattoInCasaDaBenedetta(AbstractScraper):
@classmethod
def host(cls):
return "fattoincasadabenedetta.it"

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):
step_divs = self.soup.find_all("div", {"class": "step"})

all_instructions = []
for step in step_divs:
instruction_text = normalize_string(step.get_text())
if instruction_text:
all_instructions.append(instruction_text)

return "\n".join(all_instructions)

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

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

0 comments on commit 24f0ea6

Please sign in to comment.