|
|
发表于 2020-2-15 23:18:08
|
显示全部楼层
本楼为最佳答案
- import time
- from selenium import webdriver
- def update():
- options = webdriver.ChromeOptions()
- driver = webdriver.Chrome('./chrome-win/chromedriver.exe',options=options)
- driver.get('https://music.163.com/')
- html=driver.find_elements_by_tag_name('html')[0]
- print(html.text)
- driver.switch_to.frame('contentFrame')
- driver.find_elements_by_class_name('dec')[0].click()
- driver.find_element_by_css_selector('#content-operation > a.u-btn2.u-btn2-2.u-btni-addply.f-fl').click()
- while True:
- time.sleep(1)
- continue
- driver.quit()
- if __name__ == "__main__":
- update()
复制代码 |
|