Hello something really weird happening I'm getting "Exception has occurred: JavascriptException / Message: javascript error: this.each is not a function" on this specific line:
waiting.until(EC.visibility_of_element_located((By.CLASS_NAME, "xxxx")))
it does work half of the time but at the other half gives this error
Code:
from selenium import webdriver
import time
import requests
from cgitb import text
from unittest import result
from bs4 import BeautifulSoup
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver.get("https://steamcommunity.com/market/listings/730/M4A4%20%7C%20Mainframe%20%28Minimal%20Wear%29")
waiting = WebDriverWait(driver, 10)
waiting.until(EC.visibility_of_element_located((By.CLASS_NAME, "csgofloat-itemfloat")))
page_source = driver.page_source
soup = BeautifulSoup(page_source, "html.parser")
hopefully_floats = soup.find_all("div", {"class": "csgofloat-itemfloat"})
time.sleep(15)
print(hopefully_floats)
print(type(hopefully_floats))
driver.quit()