Как сделать цикл на парсинг текста? python + selenium
Делаю бота для MonkeyType на Python + Selenium, бот должен парсить текст и водить в поле - но через не которое время он останавливается, пробовал все но не получалось это исправить. код:
from selenium import webdriver
from pynput.keyboard import Key, Controller
keyboard = Controller()
words = browser.find_elements_by_class_name("word")
for word in words:
keyboard.type(word.text)
# Press space
time.sleep(random.uniform(0.1, 0.2))
keyboard.press(Key.space)
keyboard.release(Key.space)
time.sleep(random.uniform(0.2, 0.3))