Веб-сайт:
Код: Выделить всё
https://www.inspiresleep.com/en-us/find-a-doctor/
Код: Выделить всё
Show by State
Код: Выделить всё
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import time
import requests
doctor_dict = {}
#configure webdriver
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options = options)
driver.get("https://www.inspiresleep.com/en-us/find-a-doctor/")
time.sleep(3)
driver.find_element(By.XPATH,"//button[text()='Yes']").click()
time.sleep(5)
driver.find_element(By.CLASS_NAME,"value = 'checkbox'").click()
time.sleep(2)
driver.find_element(By.XPATH,"//button[text()='Submit & Find a Doctor']")
Подробнее здесь: https://stackoverflow.com/questions/785 ... and-python