-
Notifications
You must be signed in to change notification settings - Fork 544
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
Adds support for Eatwell101.com #866
Conversation
|
||
def test_instructions(self): | ||
expected_instructions = ( | ||
"1. To make the creamy spinach turkey meatballs: In a large bowl, combine ground turkey and ground chicken, cheese, grated garlic, Italian seasoning, bouillon cube, red chili pepper flakes, chopped cilantro, and black pepper. Mix well with your hands or fork and form medium balls. Arrange the turkey meatballs on a plate and set them aside.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I generally still prefer the "\n".join([instruction, instruction, ...])
pattern, but after seeing it more often I'm beginning to come around to this representation despite the \n
at the end of each line in the code.
(no change requested here, just explaining some of my thoughts as I review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this way makes it easier to read & lets the joining be handled directly in the scraper class. If you prefer the other way I can definitely try to swap it
Looks good to me - thank you, @jknndy! After the HTML-unescaping change, I think this is ready for merge. |
Added html.unescape to category and fixed deprecation warning for ingredients.
@@ -31,7 +32,7 @@ def image(self): | |||
|
|||
def ingredients(self): | |||
ingredients_h2 = self.soup.find( | |||
"h2", text=re.compile(r"Ingredients", re.IGNORECASE) | |||
"h2", string=re.compile(r"Ingredients", re.IGNORECASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, thanks!
Resolves #787