I'm trying to create multiple chrome threads for each item in the list and execute the function for each item from list simultaneously, but having no idea where to even start any help will be much appreciated.
Code Snippet
import sys
def spotify(elem1, elem2, elem3):
print("proxy: {}, cc: {}, cvc: {}".format(elem1, elem2, elem3))
def get_cc():
cc = ['5136154545452522', '51365445452823', '51361265424522']
return cc
def get_cvc():
cvc = ['734', '690', '734']
return cvc
def get_proxies():
proxies = ['51.77.545.171:8080', '51.77.254.171:8080', '51.77.258.82:8080']
return proxies
proxArr = get_proxies()
ccArr = get_cc()
cvcArr = get_cvc()
yeslist = ['y','yes']
for elem in zip(proxArr, ccArr, cvcArr):
spotify(elem[0], elem[1], elem[2])
restart=input("Do you wish to start again: ").lower()
if restart not in yeslist:
sys.exit("Exiting")
Similar to the answer here, you can start multiple threads of Chrome.
execute_chrome
in this caseThread
call, e.g.args=(elem, )
my_selenium_tests.py
run the script preferably from the command line and not from an interactive environment (e.g. a Jupyter notebook)