oui
This commit is contained in:
parent
fae3482559
commit
dd56991f37
20
V4.py
20
V4.py
@ -50,18 +50,16 @@ FullLog = args.fulllog
|
|||||||
IsLinux = platform == "linux"
|
IsLinux = platform == "linux"
|
||||||
start_time = time()
|
start_time = time()
|
||||||
|
|
||||||
driver = None
|
|
||||||
global driver
|
global driver
|
||||||
|
driver = None
|
||||||
|
|
||||||
|
|
||||||
def Timer(text="undefined"):
|
def Timer(text="undefined"):
|
||||||
print(f"[{time() - start_time}] : ")
|
return(f"[{time() - start_time}] : " + text )
|
||||||
|
|
||||||
|
|
||||||
if IsLinux:
|
if IsLinux:
|
||||||
import enquiries
|
import enquiries
|
||||||
|
|
||||||
Timer()
|
|
||||||
else:
|
else:
|
||||||
system("") # enable colors in cmd
|
system("") # enable colors in cmd
|
||||||
|
|
||||||
@ -123,11 +121,13 @@ def FirefoxPC(Headless=Headless):
|
|||||||
|
|
||||||
def printf(txt, end="", Mobdriver=driver):
|
def printf(txt, end="", Mobdriver=driver):
|
||||||
if Log:
|
if Log:
|
||||||
Timer(txt)
|
print(Timer(txt))
|
||||||
elif FullLog and Mobdriver:
|
elif FullLog and Mobdriver:
|
||||||
LogError(txt, Mobdriver=Mobdriver)
|
LogError(Timer(txt), Mobdriver=Mobdriver)
|
||||||
else :
|
else :
|
||||||
print(txt, Mobdriver)
|
print(timer(txt), Mobdriver)
|
||||||
|
|
||||||
|
|
||||||
def CustomSleep(temps):
|
def CustomSleep(temps):
|
||||||
if Log or not IsLinux:
|
if Log or not IsLinux:
|
||||||
c = False
|
c = False
|
||||||
@ -943,9 +943,9 @@ else:
|
|||||||
try:
|
try:
|
||||||
DailyRoutine()
|
DailyRoutine()
|
||||||
driver.quit()
|
driver.quit()
|
||||||
timer = uniform(1200, 3600)
|
attente = uniform(1200, 3600)
|
||||||
print(f"finis. attente de {round(timer/60)}min")
|
print(f"finis. attente de {round(attente/60)}min")
|
||||||
CustomSleep(timer)
|
CustomSleep(attente)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("canceled")
|
print("canceled")
|
||||||
|
Loading…
Reference in New Issue
Block a user