How do multiple crawlers run side by side in the framework I developed myself?

for example, I wrote three crawlers with A B C. How do three crawlers run side by side? Is it executed by three crawlers in a function? Call this function through multithreading?

Apr.23,2021

use multithreading to call your crawler startup function, but first make sure your crawler is thread-safe. The simplest basic way to write
is as follows:

import thread

-sharp 
def crawler(param1, param2, param3):
    pass

-sharp 
try:
    thread.start_new_thread(crawler, (arg1, arg2, arg3))
    thread.start_new_thread(crawler, (_arg1, _arg2, _arg3))
except:
    print("something wrong")
Menu