Implemented multithreading on a regular selenium web scraping script with 3 different variants
- Normal scraper
main()
- Applied threading to scraper
for i in range(threads):
t = threading.Thread(target=main)
t.start()
- Applied threading and OOP
def __init__(self, threads):
self.threads = threads
for _ in range(self.threads):
t1 = threading.Thread(target=self.main)
t1.start()
Scraper()