fix some case where daily search wasn't finished and added alonger timer between each account

This commit is contained in:
piair 2022-01-07 17:56:01 +01:00
parent 3474437220
commit c26b70c49c
1 changed files with 4 additions and 4 deletions

8
V4.py
View File

@ -439,7 +439,7 @@ def login() :
LogError(e) LogError(e)
def BingPcSearch(override = randint(30,35)): def BingPcSearch(override = randint(35,40)):
driver.get(f'https://www.bing.com/search?q={choice([x for x in range (999999)])}&form=QBLH&sp=-1&pq=test&sc=8-4&qs=n&sk=&cvid=1DB80744B71E40B8896F5C1AD2DE95E9') driver.get(f'https://www.bing.com/search?q={choice([x for x in range (999999)])}&form=QBLH&sp=-1&pq=test&sc=8-4&qs=n&sk=&cvid=1DB80744B71E40B8896F5C1AD2DE95E9')
CustomSleep(uniform(1,2)) CustomSleep(uniform(1,2))
RGPD() RGPD()
@ -474,7 +474,7 @@ def BingPcSearch(override = randint(30,35)):
print('\n\n') print('\n\n')
def BingMobileSearch(override = randint(20,25)): def BingMobileSearch(override = randint(22,25)):
MobileDriver ="si il y a ca dans les logs, c'est que Mobiledriver n'a pas demarrer " MobileDriver ="si il y a ca dans les logs, c'est que Mobiledriver n'a pas demarrer "
try : try :
try : try :
@ -773,8 +773,8 @@ for i in Credentials :
try : try :
DailyRoutine() DailyRoutine()
driver.quit() driver.quit()
timer = uniform(120,360) timer = uniform(1200,3600)
print(f"finis. attente de {timer}s") print(f"finis. attente de {round(timer/60)}min")
CustomSleep(timer) CustomSleep(timer)
except KeyboardInterrupt : except KeyboardInterrupt :