sakurt adlı üyeden alıntı: mesajı görüntüle
şimdi üstad başka kodla farklı şekilde veriyi alayım dedim bu sefer hata verdi... hatamı tam anlamadım...

kod şu:
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time
import pandas as pd
from openpyxl import Workbook
from openpyxl.utils.dataframe import dataframe_to_rows

# WebDriver'ı başlatın ve sayfayı açın
driver = webdriver.Chrome()
driver.get("https://b2b.sahinogluotomotiv.net/search.aspx?q=isuzu")

# İşlemler için bir değişken tanımlayın
last_height = driver.execute_script("return document.body.scrollHeight")

# Tüm ürünler yüklenene kadar sayfayı kaydırın
while True:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
time.sleep(1)
new_height = driver.execute_script("return document.body.scrollHeight")
if new_height == last_height:
break
last_height = new_height

# Sayfadaki tüm ürünleri bulun
products = driver.find_elements_by_xpath("//div[@class='product-list-box']")

# Ürünleri içeren sözlük oluşturun
data = {"Product Name": [], "Product Code": [], "Price": [], "Image URL": []}

for product in products:
# Ürün adını, ürün kodunu, fiyatı ve resim URL'sini alın
name = product.find_element_by_xpath(".//h4").text
code = product.find_element_by_xpath(".//span[contains(text(),'Ürün Kodu')]/following-sibling::span").text
price = product.find_element_by_xpath(".//span[contains(@class, 'product-list-price')]/span[1]").text
img_url = product.find_element_by_xpath(".//img").get_attribute("src")

# Sözlüğe verileri ekleyin
data["Product Name"].append(name)
data["Product Code"].append(code)
data["Price"].append(price)
data["Image URL"].append(img_url)

# Sözlüğü pandas DataFrame'ine dönüştürün
df = pd.DataFrame(data)

# Excel dosyası için bir Workbook nesnesi oluşturun
wb = Workbook()

# Aktif çalışma sayfasını seçin
ws = wb.active

# DataFrame verilerini Excel sayfasına yazın
for r in dataframe_to_rows(df, index=False, header=True):
ws.append(r)

# Excel dosyasını kaydedin
wb.save('veri_data.xlsx')

# WebDriver'ı kapatın
driver.quit()
hata şu:
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
~\anaconda3\lib\site-packages\selenium\webdriver\common\service.py in start(self)
     70             cmd.extend(self.command_line_args())
---> 71             self.process = subprocess.Popen(cmd, env=self.env,
     72                                             close_fds=system() != 'Windows',

~\anaconda3\lib\subprocess.py in __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, encoding, errors, text)
    853 --> 854             self._execute_child(args, executable, preexec_fn, close_fds,
    855                                 pass_fds, cwd, env,

~\anaconda3\lib\subprocess.py in _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_start_new_session)
   1306             try:
-> 1307                 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
   1308                                          # no special security

FileNotFoundError: [WinError 2] Sistem belirtilen dosyayı bulamıyor
During handling of the above exception, another exception occurred:
WebDriverException Traceback (most recent call last)
<ipython-input-5-30eed5470b34> in <module>
      7       8 # WebDriver'ı başlatın ve sayfayı açın
----> 9 driver = webdriver.Chrome()
     10 driver.get("https://b2b.sahinogluotomotiv.net/search.aspx?q=isuzu")
     11
~\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
     68             service = Service(executable_path, port, service_args, service_log_path)
     69 ---> 70         super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
     71                                         port, options,
     72                                         service_args, desired_capabilities,

~\anaconda3\lib\site-packages\selenium\webdriver\chromium\webdriver.py in __init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
     87      88         self.service = service
---> 89         self.service.start()
     90      91         try:

~\anaconda3\lib\site-packages\selenium\webdriver\common\service.py in 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)
WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
ben internetten araştırım yapmaya calışan biriyim ama hep sorunlar çıkıyor genelde yabancı kaynaklı sitelrde cevaplar var onlarıda ben pek anlayamıyorum... anlayacağınız hep konuya fransız kalıyorum...

driver = webdriver.Chrome() yerine;
driver = webdriver.Chrome("chromedriver") şeklinde kullanabilirsiniz fakat requests ile istediğiniz değerleri alabiliyorsanız selenium kullanmak çok hantal olur.

https://b2b.sahinogluotomotiv.net/login.aspx giriş yapmak gerektiği için size çalışan bir request kodu oluşturamıyorum.