Scrape restaurant info from Grubhub
FollowGrubhub is a website for food delivery. In this tutorial, we are going to show you how to scrape restaurant information from Grubhub.
To follow through the tutorial, you may need the URL below:
Here are the main steps in the tutorial:
- Enter the URL on the home page - to open the target page
- Create a pagination loop - scrape all the results from multiple pages
- Create a "Loop Item" - loop click into each item on each list
- Extract Data - select the data to scrape
- Click the go back button- to go back to the home page
- Run the task - to get the desired data
1. Enter the URL on the home page - to open the target page
- Enter the URL on the home page and click Start
Tip: If you see any pop-ups on the web page, please switch to Browse mode by clicking to close it manually. Remember to turn off Browse mode after that.
2. Create a pagination loop - scrape all the results from multiple pages
- Scroll down the page and click the >> button
- Click Loop click single element on the Tips panel
3. Create a "Loop Item" - loop click into each item on each list
- Click
in pagination frame
- Click Loop
- Click on Loop Item
- Choosing Loop Mode as Variable List
- Input Xpath //div[@class='s-row restaurantCard-search-body--lessInfo restaurantCard-search-body--altLayout']
- Click Apply
- Click
inside Loop Item
- Choose Click
- Choose Relative Xpath to the Loop Item in General settings for Click Item
- Input Xpath /div
- Click Apply
4. Extract Data - select the data to scrape
- Click on the wanted data
- After all the chosen data turn green, click Extract data in the tips box
5. Click the go back button- to go back to the home page
For this website that fails to open in a new tab after clicking, we can add a click to go back button step to go back to the home page.
- click
- Click Click element in the tips box.
The final workflow will look like:
6. Run the task - to get the desired data
- Click the Save button first to save all the settings you have made
- Then click Run to run your task either locally or cloudly
- Select Run on your device and click Run Now to run the task on your local device
- Waiting for the task to complete
Below is a sample data run from the local. Excel, CSV, HTML, and JSON formats are available for export.
If you have further issues with the task or have any suggestions, we’d love to hear about them. Submit a request here.