fixed logpoint and maybe an error in BingMobileSearch

This commit is contained in:
piair 2021-12-29 13:32:16 +01:00
parent 1cc63f6d70
commit f03fb9640a
1 changed files with 9 additions and 1 deletions

10
V4.py
View File

@ -476,7 +476,13 @@ def BingPcSearch(override = randint(30,35)):
def BingMobileSearch(override = randint(20,25)):
try :
MobileDriver = FirefoxMobile()
try :
MobileDriver = FirefoxMobile()
except Exception as e :
sleep(30)
LogError('echec de la creation du driver mobile')
MobileDriver = FirefoxMobile()
echec = 0
def Mlogin(echec):
@ -637,6 +643,7 @@ def LogPoint(account="unknown"): #log des points sur discord
elem = driver.find_element(By.CSS_SELECTOR, '[title="Microsoft Rewards"]')
elem.click()
CustomSleep(5)
driver.switch_to.window(driver.window_handles[len(driver.window_handles) - 1])
CustomSleep(uniform(10,20))
try :
@ -732,6 +739,7 @@ def DailyRoutine():
except Exception as e:
LogError(f'LogPoint : {e}')
def close():
driver.quit()
quit()