Selamun Aleyküm,
Pycharmdan selenium bot için bir kod çalıştırmak istiyorum fakat google drive yolunu bulamıyor sanırım.
Şu durumu düzeltmem için yardımcı olabilir misiniz ne yapmam gerekiyor ?
Mevcut konumu "
C:Userskanunchromechoromedriver"
Tarayıcı sürümüm her şey güncel uyuşuyor.
Aldığım hata komutu :
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last) File ~\anaconda3\lib\site-packages\selenium\webdriver\common\service.py:72, in Service.start(self)
71 cmd.extend(self.command_line_args())
---> 72 self.process = subprocess.Popen(cmd, env=self.env,
73 close_fds=platform.system() != 'Windows',
74 stdout=self.log_file,
75 stderr=self.log_file,
76 stdin=PIPE)
77 except TypeError:
File ~\anaconda3\lib\subprocess.py:971, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize)
968 self.stderr = io.TextIOWrapper(self.stderr,
969 encoding=encoding, errors=errors)
--> 971 self._execute_child(args, executable, preexec_fn, close_fds,
972 pass_fds, cwd, env,
973 startupinfo, creationflags, shell,
974 p2cread, p2cwrite,
975 c2pread, c2pwrite,
976 errread, errwrite,
977 restore_signals,
978 gid, gids, uid, umask,
979 start_new_session)
980 except:
981 # Cleanup if the child failed starting.
File ~\anaconda3\lib\subprocess.py:1440, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session)
1439 try:
-> 1440 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1441 # no special security
1442 None, None,
1443 int(not close_fds),
1444 creationflags,
1445 env,
1446 cwd,
1447 startupinfo)
1448 finally:
1449 # Child is launched. Close the parent's copy of those pipe
1450 # handles that only the child should have open. You need
(...)
1453 # pipe will not close when the child process exits and the
1454 # ReadFile will hang.
FileNotFoundError: [WinError 2] Sistem belirtilen dosyayı bulamıyor
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last) Cell In[1], line 6
3 from selenium.webdriver.common.keys import Keys
5 # WebDriver'ı başlat
----> 6 driver = webdriver.Chrome() # Selenium ile Chrome kullanılıyor, gerektiğinde farklı bir tarayıcı tercih edebilirsiniz
8 def play_video(url, duration):
9 # YouTube video sayfasını aç
10 driver.get(url)
File ~\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py:73, in WebDriver.__init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive)
66 desired_capabilities.update(options.to_capabilities())
68 self.service = Service(
69 executable_path,
70 port=port,
71 service_args=service_args,
72 log_path=service_log_path)
---> 73 self.service.start()
75 try:
76 RemoteWebDriver.__init__(
77 self,
78 command_executor=ChromeRemoteConnection(
79 remote_server_addr=self.service.service_url,
80 keep_alive=keep_alive),
81 desired_capabilities=desired_capabilities)
File ~\anaconda3\lib\site-packages\selenium\webdriver\common\service.py:81, in Service.start(self)
79 except OSError as err:
80 if err.errno == errno.ENOENT:
---> 81 raise WebDriverException(
82 "'%s' executable needs to be in PATH. %s" % (
83 os.path.basename(self.path), self.start_error_message)
84 )
85 elif err.errno == errno.EACCES:
86 raise WebDriverException(
87 "'%s' executable may have wrong permissions. %s" % (
88 os.path.basename(self.path), self.start_error_message)
89 )
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium....omedriver/home