Skip to content

Instantly share code, notes, and snippets.

View userr2232's full-sized avatar
🌴
On vacation

Reynaldo RZ userr2232

🌴
On vacation
  • Vancouver, Canada
View GitHub Profile
@userr2232
userr2232 / multiprocess_selenium.py
Created December 24, 2023 00:34 — forked from wooddar/multiprocess_selenium.py
Easy Python script to run selenium web workers/browsers in parallel
"""
This is an adaptable example script for using selenium across multiple webbrowsers simultaneously. This makes use of
two queues - one to store idle webworkers and another to store data to pass to any idle webworkers in a selenium function
"""
from multiprocessing import Queue, cpu_count
from threading import Thread
from selenium import webdriver
from time import sleep
from numpy.random import randint