Sep-23-2020, 08:23 PM
(This post was last modified: Sep-23-2020, 08:24 PM by notsoexperienced.)
Now I get this error on line 14:
TypeError: '<' not supported between instances of 'WebElement' and 'WebElement'And this is the code I am running
from selenium import webdriver import time import pandas as pd import json PATH = "C:\Program Files (x86)\chromedriver.exe" driver = webdriver.Chrome(PATH) driver.get("https://www.optibet.lv/sport/wcg/CS:GO-5541") driver.implicitly_wait(12) #Finding els and switching to iframe driver.switch_to.frame(driver.find_element_by_css_selector("#iFrameResizer0")) laiks = sorted(driver.find_elements_by_class_name("event-date-time__time")) time.sleep(3) speles = sorted(driver.find_elements_by_class_name("event-block-row__name")) time.sleep(4) odds = sorted(driver.find_elements_by_class_name("odd__value")) #print found elements for laik, spele, odd in zip(laiks, speles, odds): print(f"{laik} - {spele} - {odd}")