Skip to content
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

Add support for Binging with Babish and Basics with Babish #69

Merged
merged 1 commit into from
Aug 29, 2021

Conversation

alexhuntley
Copy link
Contributor

See #56 and #15.

These sites are built using a WYSIWYG editor. The pages have an unreliable, ad-hoc structure, and each page usually contains multiple recipes (or recipe variants). The number of servings is rarely given.

Hence, we have to ask the user to choose which ingredient/method lists are wanted (using completing-read-multiple), and concatenate them together. (Alternatively we could change the org-chef format to allow for labelled sections within the ingredients and method.)

Due to the unreliable page structure, my code searches the DOM for <ul> and <ol> elements to find recipes. This seems like a relatively robust strategy.

As a side note, a similar approach might be used to make a general fallback parser, since I assume most sites use <ul> for ingredients and <ol> for instructions.

@Chobbes Chobbes merged commit a9acf45 into Chobbes:master Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants