This commit is contained in:
piair 2021-12-29 11:51:08 +01:00
parent e0a5d953d3
commit 1cc63f6d70
1 changed files with 6 additions and 4 deletions

10
V4.py
View File

@ -106,6 +106,7 @@ def CustomSleep(temps):
else : else :
sleep(temps) sleep(temps)
def ListTabs(Mdriver = None ): def ListTabs(Mdriver = None ):
tabs = [] tabs = []
if Mdriver : if Mdriver :
@ -503,8 +504,8 @@ def BingMobileSearch(override = randint(20,25)):
CustomSleep(uniform(5,10)) CustomSleep(uniform(5,10))
Mlogin(echec) Mlogin(echec)
else : else :
LogError('recherche sur mobile impossible. On skip \n\n\n\n\n\n\n\n', Mdriver=MobileDriver) LogError('recherche sur mobile impossible. On skip \n\n\n\n\n\n\n\n', Mobdriver=MobileDriver)
LogError(f"login impossible 3 fois de suite. {e}",Mdriver=MobileDriver) LogError(f"login impossible 3 fois de suite. {e}",Mobdriver=MobileDriver)
MobileDriver.quit() MobileDriver.quit()
return(True) return(True)
@ -527,7 +528,7 @@ def BingMobileSearch(override = randint(20,25)):
except exceptions.NoAlertPresentException as e : except exceptions.NoAlertPresentException as e :
pass pass
except Exception as e: except Exception as e:
LogError(f"error sur une alerte dans le driver mobile. {e}",Mdriver=MobileDriver) LogError(f"error sur une alerte dans le driver mobile. {e}",Mobdriver=MobileDriver)
if not Mlogin(echec) : if not Mlogin(echec) :
@ -555,7 +556,7 @@ def BingMobileSearch(override = randint(20,25)):
except Exception as e: except Exception as e:
LogError("BingMobileSearch" + str(e),Mdriver=MobileDriver) LogError("BingMobileSearch" + str(e),Mobdriver=MobileDriver)
try : try :
MobileDriver.quit() MobileDriver.quit()
except Exception as e: except Exception as e:
@ -746,6 +747,7 @@ CustomSleep(2)
shuffle(Credentials) shuffle(Credentials)
for i in Credentials : for i in Credentials :