Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
【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