Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created May 27, 2016 16:35
Show Gist options
  • Save kurozumi/9ece3e7dd85bc7445c4e66cc23412302 to your computer and use it in GitHub Desktop.
Save kurozumi/9ece3e7dd85bc7445c4e66cc23412302 to your computer and use it in GitHub Desktop.
【Python】Seleniumを使ってマルチプロセス(並列プロセス)でFirefoxを起動する方法
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