mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-10-31 14:23:53 +01:00 
			
		
		
		
	fixed
This commit is contained in:
		
							
								
								
									
										27
									
								
								V4.py
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								V4.py
									
									
									
									
									
								
							| @@ -418,6 +418,7 @@ def login(): | |||||||
|  |  | ||||||
|  |  | ||||||
| def BingPcSearch(override=randint(35, 40)): | def BingPcSearch(override=randint(35, 40)): | ||||||
|  |     StartTask(task["PC"]) | ||||||
|     ChangeColor(task["PC"], "blue") |     ChangeColor(task["PC"], "blue") | ||||||
|     driver.get(f"https://www.bing.com/search?q=test")  # {choice(Liste_de_mot)}') |     driver.get(f"https://www.bing.com/search?q=test")  # {choice(Liste_de_mot)}') | ||||||
|     CustomSleep(uniform(1, 2)) |     CustomSleep(uniform(1, 2)) | ||||||
| @@ -732,6 +733,7 @@ def Alerte(): | |||||||
|  |  | ||||||
| def BingMobileSearch(override=randint(22, 25)): | def BingMobileSearch(override=randint(22, 25)): | ||||||
|     ChangeColor(task["Mobile"], "blue") |     ChangeColor(task["Mobile"], "blue") | ||||||
|  |     StartTask(task["Mobile"]) | ||||||
|     global MobileDriver |     global MobileDriver | ||||||
|     MobileDriver = "unable to start" |     MobileDriver = "unable to start" | ||||||
|     try: |     try: | ||||||
| @@ -820,14 +822,21 @@ def dev(): | |||||||
| def CustomStart(Credentials): | def CustomStart(Credentials): | ||||||
|     if not LINUX_HOST : |     if not LINUX_HOST : | ||||||
|         raise NameError('You need to be on linux to do that, due to the utilisation of a module named enquieries, sorry.')  |         raise NameError('You need to be on linux to do that, due to the utilisation of a module named enquieries, sorry.')  | ||||||
|     global driver |     global driver, _mail, _password, p, task | ||||||
|     global _mail, _password |  | ||||||
|  |  | ||||||
|     system("clear")  # clear from previous command to allow a clean choice |     system("clear")  # clear from previous command to allow a clean choice | ||||||
|     actions = ["tout", "daily", "pc", "mobile", "LogPoint","Fidelite", "dev"] |     actions = ["tout", "daily", "pc", "mobile", "LogPoint","Fidelite", "dev"] | ||||||
|     Actions = enquiries.choose("quels Actions ?", actions, multi=True) |     Actions = enquiries.choose("quels Actions ?", actions, multi=True) | ||||||
|  |     liste = SelectAccount() | ||||||
|     for _mail, _password in SelectAccount(): |     with Progress( | ||||||
|  |         TextColumn("[progress.description]{task.description}"), | ||||||
|  |         BarColumn(), | ||||||
|  |         TaskProgressColumn(), | ||||||
|  |         TimeRemainingColumn(), | ||||||
|  |         TimeElapsedColumn(), | ||||||
|  |     ) as p: | ||||||
|  |         task = modules.progress.dico(p) | ||||||
|  |         for _mail, _password in liste: | ||||||
|  |  | ||||||
|             driver = FirefoxDriver() |             driver = FirefoxDriver() | ||||||
|             driver.implicitly_wait(10) |             driver.implicitly_wait(10) | ||||||
| @@ -844,12 +853,14 @@ def CustomStart(Credentials): | |||||||
|  |  | ||||||
|                 if "pc" in Actions: |                 if "pc" in Actions: | ||||||
|                     try: |                     try: | ||||||
|  |                         ShowTask(task["PC"]) | ||||||
|                         BingPcSearch() |                         BingPcSearch() | ||||||
|                     except Exception as e: |                     except Exception as e: | ||||||
|                         LogError(f"il y a eu une erreur dans BingPcSearch, {e} -- override", driver, _mail) |                         LogError(f"il y a eu une erreur dans BingPcSearch, {e} -- override", driver, _mail) | ||||||
|  |  | ||||||
|                 if "mobile" in Actions: |                 if "mobile" in Actions: | ||||||
|                     try: |                     try: | ||||||
|  |                         ShowTask(task["Mobile"]) | ||||||
|                         BingMobileSearch() |                         BingMobileSearch() | ||||||
|                     except Exception as e: |                     except Exception as e: | ||||||
|                         LogError(f"BingMobileSearch - {e} -- override", driver, _mail) |                         LogError(f"BingMobileSearch - {e} -- override", driver, _mail) | ||||||
| @@ -895,21 +906,21 @@ def unban2(): | |||||||
|         printf("you are not cureently banned on this account") |         printf("you are not cureently banned on this account") | ||||||
|  |  | ||||||
|  |  | ||||||
| def EnableTask(task): | def StartTask(task): | ||||||
|     p.start_task(task) |     p.start_task(task) | ||||||
|  |  | ||||||
| def ShowTask(task): | def ShowTask(task): | ||||||
|     p.update(task, visible=True) |     p.update(task, visible=True) | ||||||
|  |  | ||||||
| def AdvanceTask(task, pourcentage): | def AdvanceTask(task, pourcentage): | ||||||
|     progress.update(task, advance=pourcentage) |     p.update(task, advance=pourcentage) | ||||||
|  |  | ||||||
| def ChangeColor(task, newcolor): | def ChangeColor(task, newcolor): | ||||||
|     old = progress.tasks[task].description |     old = p.tasks[task].description | ||||||
|     old = old.split(']') |     old = old.split(']') | ||||||
|     old[0] = f"[{newcolor}" |     old[0] = f"[{newcolor}" | ||||||
|     new = "]".join(old) |     new = "]".join(old) | ||||||
|     progress.update(task,description=new) |     p.update(task,description=new) | ||||||
|  |  | ||||||
|  |  | ||||||
| if CUSTOM_START: | if CUSTOM_START: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user