I have a problem with geckodriver.exe.
I am going to create a bot but I dont know how to set up mozilla driver.
from selenium import webdriver
geckodriver_yolu = "./geckodriver.exe"
tarayici = webdriver.Firefox(executable_path=geckodriver_yolu)
tarayici.get("https://www.youtube.com")
If you are using latest selenium version(
v4.6.0or above), then code can be as simple as:Selenium Manager will take care of driver management, no need to worry about setting
geckodriver.exepath manually.Refer this answer - https://stackoverflow.com/a/76463081/7598774
And for any reason, if you wish to set the driver path manually, then below the code: