enabled multi action and multi account on override

This commit is contained in:
piair 2022-02-23 18:50:41 +01:00
parent 8447bbf51c
commit e68763f698

32
V4.py
View File

@ -723,49 +723,49 @@ def CustomStart(Credentials):
global _mail global _mail
global _password global _password
ids = [x[0] for x in Credentials] ids = [x[0] for x in Credentials] #list of all email adresses
actions=["tout", "daily", "pc", "mobile", "LogPoint"] actions=["tout", "daily", "pc", "mobile", "LogPoint"]
system("clear") system("clear") #clear from previous command to allow a clean choice
Comptes = enquiries.choose('quels comptes ?', ids, multi=True) Comptes = enquiries.choose('quels comptes ?', ids, multi=True)
Actions = enquiries.choose('quels Actions ?', actions, multi=True) Actions = enquiries.choose('quels Actions ?', actions, multi=True)
print(Comptes, Actions, Credentials)
for i in Comptes :
_mail =Credentials[ids.index(i)][0]
_password = Credentials[ids.index(i)][1]
driver = FirefoxPC() driver = FirefoxPC()
driver.implicitly_wait(15) driver.implicitly_wait(15)
"""
login() login()
_mail =Credentials[choice1][0] if "tout" in Actions :
_password = Credentials[choice1][1]
if choice2 == 0 :
DailyRoutine() DailyRoutine()
elif choice2 == 1 :
if "daily" in Actions :
try : try :
AllCard() AllCard()
except Exception as e : except Exception as e :
LogError(f'pas normal sauf si relancer a la main, juste pour les recherches bing (DalyRoutine -> AllCard) \n {str(e)}. -- override') LogError(f'pas normal sauf si relancer a la main, juste pour les recherches bing (DalyRoutine -> AllCard) \n {str(e)}. -- override')
elif choice2 == 2 :
if "pc" in Actions:
try : try :
BingPcSearch() BingPcSearch()
except Exception as e : except Exception as e :
LogError(f"il y a eu une erreur dans BingPcSearch, {e} -- override") LogError(f"il y a eu une erreur dans BingPcSearch, {e} -- override")
elif choice2 == 3 :
if "mobile" in Actions:
try : try :
BingMobileSearch() BingMobileSearch()
except Exception as e: except Exception as e:
LogError(f'BingMobileSearch - {e} -- override') LogError(f'BingMobileSearch - {e} -- override')
driver.close() driver.close()
try : try :
driver = FirefoxPC()
driver.implicitly_wait(15)
login()
LogPoint(_mail) LogPoint(_mail)
driver.close()
except Exception as e : except Exception as e :
print("CustomStart " + str(e)) print("CustomStart " + str(e))
"""
with open(LogPath) as f: with open(LogPath) as f:
reader = reader(f) reader = reader(f)
data = list(reader) data = list(reader)