Created
May 27, 2016 16:35
-
-
Save kurozumi/9ece3e7dd85bc7445c4e66cc23412302 to your computer and use it in GitHub Desktop.
【Python】Seleniumを使ってマルチプロセス(並列プロセス)でFirefoxを起動する方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from multiprocessing import Pool | |
def browser(url): | |
browser = webdriver.Firefox() | |
browser.get(url) | |
browser.close() | |
p = Pool(10) | |
p.map(browser, [ | |
"https://www.google.co.jp", | |
"http://www.yahoo.co.jp" | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment