I am trying to scrape data from https://www.doordash.com/food-delivery/chicago-il-restaurants/
The idea is to scrape all the data regarding the different restaurant listings on the website. The site is divided into different cities, but I only require restaurant data for Chicago.
All restaurant listings for the city have to be scraped along with any other relevant data about the respective restaurants (Ex: Reviews, Rating, Cuisine, address, state etc). I need to capture all the respective details(currently 4,326 listings) for the city in the Excel.
I have tried to extract the restaurant name, cuisine, ratings and review inside the class named "StoreCard_root___1p3uN". But No datas have been displayed. The output is blank.
from selenium import webdriver
chrome_path = r"D:\python project\chromedriver.exe"
driver = webdriver.Chrome(chrome_path)
driver.get("https://www.doordash.com/food-delivery/chicago-il-restaurants/")
driver.find_element_by_xpath("""//*[@id="SeoApp"]/div/div[1]/div/div[2]/div/div[2]/div/div[2]/div[1]/div[3]""").click()
posts = driver.find_elements_by_class_name("StoreCard_root___1p3uN")
for post in posts:
print(post.text) ```
