Код: Выделить всё
import undetected_chromedriver.v2 as uc
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def main(url):
options = uc.ChromeOptions()
options.headless = True
driver = uc.Chrome(options=options)
driver.get(url)
try:
WebDriverWait(driver, 10).until(
EC.title_contains(('Reservations'))
)
print(driver.title)
except Exception as e:
print(type(e).__name__)
finally:
driver.quit()
if __name__ == "__main__":
main('https://www.example.com/')
P.S ищу решение только для селена.
Подробнее здесь: https://stackoverflow.com/questions/736 ... less-is-on