1
from bs4 import BeautifulSoup
import requests
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import time
from selenium.webdriver.common.keys import Keys
import datetime as dt
import urllib.parse

I ran this orders.. and I've got these warning.. What should I do?

C:\Users\jinwoo\AppData\Local\Temp/ipykernel_5340/2973355007.py:2: DeprecationWarning: executable_path has been deprecated, please pass in a Service object browser=webdriver.Firefox(executable_path='C:/Users/jinwoo/geckodriver.exe',firefox_binary=binary) C:\Users\jinwoo\AppData\Local\Temp/ipykernel_5340/2973355007.py:2: DeprecationWarning: firefox_binary has been deprecated, please pass in a Service object browser=webdriver.Firefox(executable_path='C:/Users/jinwoo/geckodriver.exe',firefox_binary=binary

pmadhu
  • 3,373
  • 2
  • 11
  • 23
hey
  • 33
  • 1
  • 4

1 Answers1

1

executable_path option is no longer supported in Selenium 4.

You need to provide path for chromedriver.exe as below:

# Imports required
from selenium.webdriver.chrome.service import Service

driver = webdriver.Chrome(service= Service("path to chromedriver.exe"))

You can also refer this

pmadhu
  • 3,373
  • 2
  • 11
  • 23