Sorry to be a nube but can someone tell me to change this script to run Edge instead. I have installed the webdriver for Edge but still get an error message
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium_stealth import stealth
import pandas as pd
import time
import numpy as np
# Set up the Selenium WebDriver with selenium-stealth
options = webdriver.ChromeOptions()
# options.add_argument('--headless') # Run headless browser, comment this line if you want to see the browser actions
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=chrome_options)
Thanks
yntaxError: invalid syntax
(venv) MacBook-Air-3:indeed_scrapper steven$ python3 test.py
/Users/steven/Downloads/Indeed_Scrapper/venv/lib/python3.9/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with ‘LibreSSL 2.8.3’. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Traceback (most recent call last):
File “/Users/steven/Downloads/Indeed_Scrapper/test.py”, line 22, in
driver = webdriver.Edge(r/downloads/indeed_scrapper/msedgedriver.exe)
NameError: name ‘r’ is not defined
(venv) MacBook-Air-3:indeed_scrapper steven$
Sfrank is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.