okok.
This commit is contained in:
parent
6969a5aba2
commit
98ede97956
39
V4.py
39
V4.py
@ -36,7 +36,9 @@ FullLog = args.fulllog
|
|||||||
IsLinux = platform == "linux"
|
IsLinux = platform == "linux"
|
||||||
|
|
||||||
|
|
||||||
if not IsLinux :
|
if IsLinux :
|
||||||
|
import enquiries
|
||||||
|
else :
|
||||||
system("") #enable colors in cmd
|
system("") #enable colors in cmd
|
||||||
|
|
||||||
config_path = "/home/pi/MsReward/config"
|
config_path = "/home/pi/MsReward/config"
|
||||||
@ -698,7 +700,6 @@ def DailyRoutine():
|
|||||||
LogError(f"il y a eu une erreur dans BingPcSearch, {e}")
|
LogError(f"il y a eu une erreur dans BingPcSearch, {e}")
|
||||||
CustomSleep(uniform(3,20))
|
CustomSleep(uniform(3,20))
|
||||||
|
|
||||||
|
|
||||||
try :
|
try :
|
||||||
BingMobileSearch()
|
BingMobileSearch()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -721,47 +722,33 @@ def CustomStart(Credentials):
|
|||||||
global driver
|
global driver
|
||||||
global _mail
|
global _mail
|
||||||
global _password
|
global _password
|
||||||
driver="chelou"
|
|
||||||
ids = [x[0] for x in Credentials]
|
ids = [x[0] for x in Credentials]
|
||||||
actions=["tout", "daily", "pc", "mobile", "LogPoint"]
|
actions=["tout", "daily", "pc", "mobile", "LogPoint"]
|
||||||
|
|
||||||
for i in range(len(ids)) :
|
driver = FirefoxPC()
|
||||||
print(f"{i} : {ids[i]}")
|
driver.implicitly_wait(15)
|
||||||
|
|
||||||
choice1 = int(input(""))
|
Comptes = enquiries.choose('quels comptes ?', ids, multi=True)
|
||||||
assert choice1 < len(ids)
|
Actions = enquiries.choose('quels Actions ?', actions, multi=True)
|
||||||
|
|
||||||
for i in range(len(actions)) :
|
print(Comptes, Actions)
|
||||||
print(f"{i} : {actions[i]}")
|
|
||||||
|
|
||||||
choice2 = int(input(""))
|
|
||||||
assert choice2 < len(actions)
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
login()
|
||||||
_mail =Credentials[choice1][0]
|
_mail =Credentials[choice1][0]
|
||||||
_password = Credentials[choice1][1]
|
_password = Credentials[choice1][1]
|
||||||
|
|
||||||
if choice2 == 0 :
|
if choice2 == 0 :
|
||||||
driver = FirefoxPC()
|
|
||||||
driver.implicitly_wait(15)
|
|
||||||
login()
|
|
||||||
DailyRoutine()
|
DailyRoutine()
|
||||||
driver.close()
|
|
||||||
elif choice2 == 1 :
|
elif choice2 == 1 :
|
||||||
try :
|
try :
|
||||||
driver = FirefoxPC()
|
|
||||||
driver.implicitly_wait(15)
|
|
||||||
login()
|
|
||||||
AllCard()
|
AllCard()
|
||||||
driver.close()
|
|
||||||
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 :
|
elif choice2 == 2 :
|
||||||
try :
|
try :
|
||||||
driver = FirefoxPC()
|
|
||||||
driver.implicitly_wait(15)
|
|
||||||
login()
|
|
||||||
BingPcSearch()
|
BingPcSearch()
|
||||||
driver.close()
|
|
||||||
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 :
|
elif choice2 == 3 :
|
||||||
@ -769,7 +756,7 @@ def CustomStart(Credentials):
|
|||||||
BingMobileSearch()
|
BingMobileSearch()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LogError(f'BingMobileSearch - {e} -- override')
|
LogError(f'BingMobileSearch - {e} -- override')
|
||||||
print("done!")
|
driver.close()
|
||||||
try :
|
try :
|
||||||
driver = FirefoxPC()
|
driver = FirefoxPC()
|
||||||
driver.implicitly_wait(15)
|
driver.implicitly_wait(15)
|
||||||
@ -778,7 +765,7 @@ def CustomStart(Credentials):
|
|||||||
driver.close()
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user