79640151

Date: 2025-05-27 09:11:45
Score: 0.5
Natty:
Report link

my code is:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait, Select
from selenium.webdriver.support import expected_conditions as EC
import time
url = 'https://www.nepremicnine.net/'
options = webdriver.ChromeOptions() 
service = Service() #Service('path/to/chromedriver') #Service()  # Optional: 
driver = webdriver.Chrome(service=service)
driver.get(url)
btn1 = driver.find_element(By.ID, "CybotCookiebotDialogBodyButtonAccept")
btn1.click()
all_cookies = driver.get_cookies()
for cookie in all_cookies:
    print(f"Name: {cookie['name']}, Value: {cookie['value']}")

time.sleep(5)
src_btn = WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.XPATH, "//a[@class='gumb potrdi']")))
src_btn.click()

time.sleep(200)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Rok Golob