所以我对编码相当陌生,我应该解析 Yelp 评论,这样我就可以使用 Pandas 分析数据。我一直在尝试使用 selenium/beautifulsoup 来自动化整个过程,但我无法克服我编写的每个版本的代码中的 webdriver/chromedriver 错误。
!pip install selenium
from selenium import webdriver
from bs4 import BeautifulSoup
import pandas as pd
import os
# Set the path to the ChromeDriver executable
chromedriver_path = "C:\\Users\\5mxz2\\Downloads\\chromedriver\\chromedriver"
# Set the URL of the Yelp page you want to scrape
url = "https://www.yelp.com/biz/gelati-celesti-virginia-beach-2"
# Set the options for Chrome
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless") # Run Chrome in headless mode, comment this line if you want to see the browser window
# …Run Code Online (Sandbox Code Playgroud) automation typeerror selenium-chromedriver selenium-webdriver