Here is my construction of my code and the Problem is, that the code is not running in in this case 2 (range(2)) different browsers which act at the same time. Instead of that, the programm does double the code and run it only in one browser. How do i get the code running in multiple browsers? Thanks
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time, requests, cfscrape, threading
from time import gmtime, strftime
from termcolor import colored
from threading import Thread
driver =
webdriver.Chrome(executable_path="...")
def main():
def gotohomepage():
...
gotohomepage()
def cookies():
...
cookies()
def queuechecker():
...
queuechecker()
def retrieving_productpage1():
...
retrieving_productpage1()
def gettingProductUrl():
...
gettingProductUrl()
threads = []
for i in range(2):
t = threading.Thread(target=main)
threads.append(t)
t.start()
for thread in threads:
t.join()
main()