import time
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

def get_token_info(url):
    chrome_options = Options()
    chrome_options.add_argument("–headless")

    # Update the path below to the actual path to your WebDriver executable
    driver = webdriver.Chrome(
        executable_path="C:\\Users\\AshotxXx\\PycharmProjects\\Parcing\\pythonProject\\ChromeDriver\\chromedriver.exe", options = chrome_options)
    driver.get(url)

    time.sleep(5)  # Wait for the page to properly loaded/rendered
    soup = BeautifulSoup(driver.page_source,"html.parser")

    token_info_element = soup.find("div", class_="token-info")
    infocard_element = soup.find("div", class_="infocard")
    check_alert_element = soup.find("div", class_="token-check-message check-alert")
    check_warning_element = soup.find("div", class_="token-check-message check-warning")
    check_info_element = soup.find("div", class_="token-check-message check-info")
    not_verified_element = soup.find("div", class_="not-verified")

    check_alert_status = "Yes" if check_alert_element else "None"
    check_warning_status = "Yes" if check_warning_element else "None"
    check_info_status = "Yes" if check_info_element else "None"
    not_verified_status = "Yes" if not_verified_element else "None"

    if token_info_element and infocard_element:
        token_name_element = token_info_element.find("span", class_="name")
        token_symbol_element = token_info_element.find("span", class_="symbol")
        info_items = infocard_element.find_all("li")

        if token_name_element and token_symbol_element and len(info_items) >= 7:
            token_name = token_name_element.text.strip()
            token_symbol = token_symbol_element.text.strip()
            price = info_items[0].find("span", class_="value").text.strip()
            max_supply = info_items[1].find("span", class_="value").text.strip()
            market_cap = info_items[2].find("span", class_="value").text.strip()
            liquidity = info_items[3].find("span", class_="value").text.strip()
            liq_mc = info_items[4].find("span", class_="value").text.strip()
            token_age = info_items[6].find("span", class_="value").text.strip()

            driver.quit()

            return {
            "name": token_name,
            "symbol": token_symbol,
            "price": price,
            "max_supply": max_supply,
            "market_cap": market_cap,
            "liquidity": liquidity,
            "liq_mc": liq_mc,
            "token_age": token_age,
            "check_alert": check_alert_status,
            "check_warning": check_warning_status,
            "check_info": check_info_status,
            "not_verified": not_verified_status
            }

        else:
            driver.quit()
            return {"error": "Failed to find the required info items or name and.symbol"}

    else:
        driver.quit()
        return {"error": "Failed to find the required elements for name and symbol"}

url="https://moonarch.app/token/0x38edcaa9eCF073E3Ed2F0d41444c27e3CE997f5F"
print(get_token_info(url))

The code above returns an error response. The error is located below.

C:\Users\AshotxXx\PycharmProjects\Parcing\pythonProject\venv\Scripts\python.exe C:\Users\AshotxXx\PycharmProjects\Parcing\pythonProject\ChromeDriver\main.py 
C:\Users\AshotxXx\PycharmProjects\Parcing\pythonProject\ChromeDriver\main.py:11: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
  driver = webdriver.Chrome(
{'error': 'Failed to find the required info items or name and.symbol'}

Process finished with exit code 0

Fix this error. If necessary, add an exception where required to avoid errors.