Threading in seleniumbase #2835
-
Hey, so I'm trying to bypass Cloudflare's "Verify you are human" CAPTCHA, and it works sometimes. However, when it doesn't work and asks us to click on the verify box, I encounter an issue. Once it clicks on the box, it never bypasses Cloudflare, and I'm stuck on the page without being able to proceed. Am I doing something wrong here? ''' Multi-threading for handling multiple accountsdef main():
''' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Duplicate of #2828 (comment) See the example that uses import sys
from concurrent.futures import ThreadPoolExecutor
from seleniumbase import Driver
sys.argv.append("-n") # Tell SeleniumBase to do thread-locking as needed
def launch_driver(url):
driver = Driver(uc=True)
try:
driver.get(url=url)
driver.sleep(2)
finally:
driver.quit()
urls = ['https://seleniumbase.io/demo_page' for i in range(3)]
with ThreadPoolExecutor(max_workers=len(urls)) as executor:
for url in urls:
executor.submit(launch_driver, url) Or use |
Beta Was this translation helpful? Give feedback.
Duplicate of #2828 (comment)
See the example that uses
ThreadPoolExecutor
with UC Mode:Or use
pytest
multithreading withpytest-xdist
and theparameterized
library: #2394 (comment)