Skip to content

Scrape at scale running multiple Headful UC Mode of SeleniumBase Instances (Like Selenium Grid) #3819

Answered by mdmintz
juanfrilla asked this question in Q&A
Discussion options

You must be logged in to vote

There are three different examples for using multiple drivers at the same time with the pure Python formats:


Multi-threading in UC Mode is also possible if you use pytest multi-threading provided by pytest-xdist.

You'll need to use command-line options for this format, eg --uc to activate UC Mode, and -n4 (for 4 parallel processes, etc). You can go as high as the number of cores safely. Eg, since my computer has 8 cores, I can do -n8 for 8 parallel processes.

Below is a sample run command, with the options you need:

pytest --uc -n4

Also note that UC Mode and CDP Mode aren't compatible…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants