我想用爬虫去在Google中按照关键词爬取乌克兰,电子烟的经销商的主页,联系电话,邮箱地址等信息,下面是代码
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import pandas as pd
import time
# 设置Chrome浏览器和ChromeDriver路径
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=117.114.149.66:55443') # 添加代理服务器
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
options.add_argument('--start-maximized')
driver_path = '/path/to/E:/chromedriver_win32/chromedriver.exe' # 替换为ChromeDriver的路径
driver = webdriver.Chrome(service=webdriver.chrome.service.Service(executable_path=driver_path), options=options)
# 打开Google搜索页面
driver.get('https://www.google.com')
# 在搜索框中输入关键词
search_box = driver.find_element(By.NAME, 'q')
search_box.send_keys('vape, ukraine')
search_box.send_k