标签:splay exe element join() processes path 动态 ignore except
import os
import multiprocessing
1、获取Chromedriver驱动动态路径
webdriver.Chrome(executable_path=os.path.join(os.getcwd(), "chromedriver.exe"))
2、等待特地(label)网页元素加载完毕,返回真
is_disappeared = WebDriverWait(dr, 30, 1, ignored_exceptions=TimeoutException).until(lambda x: x.find_element_by_id("label").is_displayed())
3、多进程
if __name__ == ‘__main__‘:
multiprocessing.freeze_support()
pool = multiprocessing.Pool(processes=3)
for i in range(2):
pool.apply_async(func,args=(args,))
pool.close()
pool.join()
标签:splay exe element join() processes path 动态 ignore except
原文地址:http://www.cnblogs.com/vickey-wu/p/6655579.html