Web scraping recipe data from the internet
Show older comments
Hi all,
I wanted to write a code for ingesting and storing recipe data from a webpage.
For this webpage https://veganheaven.org/recipe/greek-pasta-salad/ I wish to create a CSV file with a column storing all the ingredients in the form of a string array.
Could someone help me please? Thanks
Answers (1)
Rik
on 12 May 2020
0 votes
Load the page as a char array, then search for '<p>You need:</p>'. The list of ingredients is enclosed by ul tags, so that shouldn't be too hard to parse. The last step would be to convert each ingredient from a char array to a string scalar.
Categories
Find more on Call Web Services from MATLAB Using HTTP in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!