python ile bu scripti yazdım
Bu hatayı alıyorum
gecko path e dahil olmasına rağmen bunu çıkartıyo
Kod:
# -*- coding: UTF-8 -*-
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
url = str(input("enter url : "))
options = Options()
options.headless = True
br = webdriver.Firefox(options=options)
br.get(url)
Bu hatayı alıyorum
Kod:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver': 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pythondeneme.py", line 12, in <module>
br = webdriver.Firefox(options=options)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
gecko path e dahil olmasına rağmen bunu çıkartıyo
Moderatör tarafında düzenlendi: