标签:start arch selenium tle python sleep http quit reading
from threading import Thread
from selenium import webdriver
from time import sleep
def baidu_search():
dr = webdriver.Chrome()
dr.get(‘https://www.baidu.com‘)
dr.find_element(‘id‘, ‘kw‘).send_keys(‘简书 韩志超‘)
dr.find_element(‘id‘, ‘su‘).click()
print(dr.title)
dr.quit()
if __name__ == ‘__main__‘:
t1 = Thread(target=baidu_search)
t2 = Thread(target=baidu_search)
t3 = Thread(target=baidu_search)
t1.start()
sleep(0.5)
t2.start()
sleep(0.5)
t3.start()
标签:start arch selenium tle python sleep http quit reading
原文地址:https://www.cnblogs.com/superhin/p/13898607.html