Код: Выделить всё
Traceback (most recent call last):
File "/home/SmallCoder14/orthodox_saints_of_the_day/get_quotes.py", line 14, in
quote = WebDriverWait(driver, 10).until(
File "/usr/local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 89, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x5f8f634cbe89
Код: Выделить всё
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options = webdriver.ChromeOptions()
options.add_argument('--no-sandbox')
options.add_argument("--headless")
driver = webdriver.Chrome(options=options)
driver.get("https://SmallCoder14.pythonanywhere.com/quote-of-the-day")
quote = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, "/html/body/div/p[1]"))
)
driver.quit()
Подробнее здесь: https://stackoverflow.com/questions/792 ... cal-device
Мобильная версия