-
Here's the code: except Exception as ex: if name == 'main': using for json parse(bypass cf challenge) def init(self, driver): def get_json(self, url):
after 1-2 hours working I always had errors like: I think it is because of cf bypass, because it is using GUI for Can I use few Process instead of single? Ran my program at windows server with 42 threads support |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For multithreading, you have two options:
Note that now there's CDP Mode, which is an upgrade over regular UC Mode. Add The number of threads should not exceed the number of CPUs on a system. Also note that the CAPTCHA-clicking methods use |
Beta Was this translation helpful? Give feedback.
For multithreading, you have two options:
pytest
viapytest-xdist
. (Eg.pytest -n3
, as seen in SeleniumBase/examples/presenter/multi_uc.py)ThreadPoolExecutor
as shown in SeleniumBase/help_docs/uc_mode.md.Note that now there's CDP Mode, which is an upgrade over regular UC Mode. Add
sb.uc_gui_click_captcha()
as needed.The number of threads should not exceed the number of CPUs on a system.
Also note that the CAPTCHA-clicking methods use
PyAutoGUI
: Only one thread is allowed to move the mouse at one time.