Here is what I am trying to type in:
web = 'https://www.actionnetwork.com/mlb/odds'
path = '/Users/Downloads/chromedriver'
driver = webdriver.Chrome(path)
and this is the error I am receiving after that last line:
Warning (from warnings module):
File "<pyshell#5>", line 1
DeprecationWarning: executable_path has been deprecated, please pass in a Service object
Traceback (most recent call last):
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
driver = webdriver.Chrome(path)
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__
super().__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 89, in __init__
self.service.start()
File "C:\Users\mynew\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
So I tried this:
warnings.filterwarnings("ignore", category=DeprecationWarning)
and I get this:
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
warnings.filterwarnings("ignore", category=DeprecationWarning)
NameError: name 'warnings' is not defined. Did you mean: 'Warning'?
Like I said, this is my first time using Python so I am extremely lost on what to do from here.