Answer the question
In order to leave comments, you need to log in
How to deal with threading?
Please help me understand the flow.
# Список с проксями
for proxy in PROXY_LIST:
# создаем поток и передаем в него прокси
t1 = threading.Thread(target=get_proxy, args=(proxy,))
# ShBrowser при инициализации добавляем 1, при завершении отнимаем
# Если экземпляров класса запущено меньше 3 то стартуем поток
if int(ShBrowser.active) <= 3:
t1.start()
continue
else:
# Если иначе спим
time.sleep(30)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question