Baidu website, for example, using PyCharm tools,
# to introduce web drive library
The from the selenium import webdriver
# define variables named driver, used to hold the browser drive
Driver=webdriver. Chrome ()
# use drive to open a browser, and enter the url
Driver. The get (" http://www.baidu.com ")
# locate form form input box
Input=driver. Find_element_by_name (" wd ")
# input key word, word for word input
# 1. Import the key word stock
The from selenium.webdriver.com mon. Keys import keys
The import time
# 2. Key assignment
Input. Send_keys (u "python crawler")
The result of # 3. The response page
Input. Send_keys (Keys. RETURN)
Time. Sleep (5)
# close the browser drive
Driver. The close ()
CodePudding user response:
So the landlord want to say what does that meanCodePudding user response:
Oh,,,,,,,,,,