爬蟲實踐其二

Posted tyh-tesla

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了爬蟲實踐其二相关的知识,希望对你有一定的参考价值。

動態獲取

from selenium import webdriver
from time import sleep
bro = webdriver.Chrome(executable_path=‘./chromedriver‘)
bro.get(‘http://www.baidu.com‘)

text = bro.find_element_by_id(‘kw‘)
text.send_keys(‘時間‘)
sleep(1)
button = bro.find_element_by_id(‘su‘)
button.click()

  

以上是关于爬蟲實踐其二的主要内容,如果未能解决你的问题,请参考以下文章