from selenium import webdriver from lxml import etree from selenium.webdriver.common.by import By import time driver =webdriver.Chrome('F:谷驱动chromedriver_win32chromedriver.exe') driver.maximize_window() driver.get("https://zz.fang.com/") driver.find_element(By.XPATH,'//*[@id="sfHeadUsername"]').click() driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div[1]/dt/span[2]').click() driver.find_element(By.ID,'username').send_keys('15225133547') driver.find_element(By.XPATH,'//*[@id="password"]').send_keys('wzh123123') driver.find_element(By.XPATH,'//*[@id="loginWithPswd"]').click() driver.get('https://zz.esf.fang.com/house-a014862/kw%D6%D0%D4%AD%C7%F8/') driver.find_element(By.XPATH,'//*[@id="dsy_D01_03"]/div[1]/a').click() driver.find_element(By.XPATH,'//*[@id="kesfqbfylb_A01_03_01"]/ul/li[3]/a').click()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)