-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit * adding marthastewart * running black on files * removing dupe import * black on test file Co-authored-by: Carl Anderson <[email protected]>
- Loading branch information
1 parent
6400656
commit faf354b
Showing
5 changed files
with
5,812 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from ._abstract import AbstractScraper | ||
from ._utils import get_minutes | ||
|
||
|
||
class MarthaStewart(AbstractScraper): | ||
@classmethod | ||
def host(cls): | ||
return "marthastewart.com" | ||
|
||
def title(self): | ||
return self.schema.title() | ||
|
||
def total_time(self): | ||
s = ( | ||
self.soup.findAll("div", {"class": "two-subcol-content-wrapper"})[0] | ||
.find("div", {"class": "recipe-meta-item-body"}) | ||
.text.strip() | ||
) | ||
return get_minutes(s) | ||
|
||
def yields(self): | ||
return ( | ||
self.soup.findAll("div", {"class": "two-subcol-content-wrapper"})[1] | ||
.find("div", {"class": "recipe-meta-item-body"}) | ||
.text.strip() | ||
) | ||
|
||
def ingredients(self): | ||
return self.schema.ingredients() | ||
|
||
def instructions(self): | ||
return self.schema.instructions() | ||
|
||
def ratings(self): | ||
return self.schema.ratings() |
Oops, something went wrong.