In the previous lecture we installed and learned about Selenium. But a quick head up:
If you are using Selenium 4 or higher, you will see this deprecation warning:DeprecationWarning: executable_path has been deprecated, please pass in a Service object chrome_browser = webdriver.Chrome('./chromedriver')
If you want it to go away (code will still work regardless), you can follow the instructions found here: https://www.selenium.dev/documentation/getting_started/how_to_upgrade_to_selenium_4/#python-1
For your code, you would change it to
from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service(executable_path='./chromedriver') chrome_browser = webdriver.Chrome(service=service)