mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-10-30 22:13:52 +01:00 
			
		
		
		
	better naming + remove a dumb thing
This commit is contained in:
		
							
								
								
									
										34
									
								
								V4.py
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								V4.py
									
									
									
									
									
								
							| @@ -72,7 +72,7 @@ MotPath = config["DEFAULT"]["motpath"] | |||||||
| LogPath = config["DEFAULT"]["logpath"] | LogPath = config["DEFAULT"]["logpath"] | ||||||
| SuccessLink = config["DEFAULT"]["successlink"] | SuccessLink = config["DEFAULT"]["successlink"] | ||||||
| ErrorLink = config["DEFAULT"]["errorlink"] | ErrorLink = config["DEFAULT"]["errorlink"] | ||||||
| fidelity = config["DEFAULT"]["fidelity"] | FidelityLink = config["DEFAULT"]["FidelityLink"] | ||||||
| embeds = config["DEFAULT"]["embeds"] == "True" | embeds = config["DEFAULT"]["embeds"] == "True" | ||||||
| Headless = config["DEFAULT"]["headless"] == "True" | Headless = config["DEFAULT"]["headless"] == "True" | ||||||
|  |  | ||||||
| @@ -733,7 +733,7 @@ def LogPoint(account="unknown"):  # log des points sur discord | |||||||
|         webhookSuccess.send(f"{account} actuellement à {str(point)} points") |         webhookSuccess.send(f"{account} actuellement à {str(point)} points") | ||||||
|  |  | ||||||
|  |  | ||||||
| def Fidelite(lien): | def Fidelite(): | ||||||
|     try: |     try: | ||||||
|         while 1: #close all tabs |         while 1: #close all tabs | ||||||
|             try: |             try: | ||||||
| @@ -741,6 +741,10 @@ def Fidelite(lien): | |||||||
|             except: |             except: | ||||||
|                 break |                 break | ||||||
|  |  | ||||||
|  |         result = get(FidelityLink) #get the url of fidelity page | ||||||
|  |         lien = result.content.decode("UTF-8") | ||||||
|  |         printf(lien) | ||||||
|  |  | ||||||
|         if (lien.split(":")[0] == "https") or (lien.split(":")[0] == "http") :  |         if (lien.split(":")[0] == "https") or (lien.split(":")[0] == "http") :  | ||||||
|              |              | ||||||
|             driver.get(lien) |             driver.get(lien) | ||||||
| @@ -808,7 +812,7 @@ def DailyRoutine(): | |||||||
|     print("\n") |     print("\n") | ||||||
|     CustomSleep(uniform(3, 20)) |     CustomSleep(uniform(3, 20)) | ||||||
|     try: |     try: | ||||||
|         FidelityTest() |         Fidelite() | ||||||
|     except: |     except: | ||||||
|         pass |         pass | ||||||
|  |  | ||||||
| @@ -823,18 +827,8 @@ def close(): | |||||||
|     quit() |     quit() | ||||||
|  |  | ||||||
|  |  | ||||||
| def FidelityTest(): |  | ||||||
|     try: |  | ||||||
|         result = get(fidelity) |  | ||||||
|         lien = result.content.decode("UTF-8") |  | ||||||
|         print(lien) |  | ||||||
|         Fidelite(lien) |  | ||||||
|     except Exception as e: |  | ||||||
|         print(f"erreur dans la partie dev : {e}") |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def dev(): | def dev(): | ||||||
|     FidelityTest() |     printf("il n'y a pas de fonction en cours de dev") | ||||||
|  |  | ||||||
|  |  | ||||||
| def CustomStart(Credentials): | def CustomStart(Credentials): | ||||||
| @@ -843,7 +837,7 @@ def CustomStart(Credentials): | |||||||
|     global _password |     global _password | ||||||
|  |  | ||||||
|     ids = [x[0] for x in Credentials]  # list of all email adresses |     ids = [x[0] for x in Credentials]  # list of all email adresses | ||||||
|     actions = ["tout", "daily", "pc", "mobile", "LogPoint", "dev"] |     actions = ["tout", "daily", "pc", "mobile", "LogPoint","Fidelite", "dev"] | ||||||
|  |  | ||||||
|     system("clear")  # clear from previous command to allow a clean choice |     system("clear")  # clear from previous command to allow a clean choice | ||||||
|     Comptes = enquiries.choose("quels comptes ?", ids, multi=True) |     Comptes = enquiries.choose("quels comptes ?", ids, multi=True) | ||||||
| @@ -864,9 +858,7 @@ def CustomStart(Credentials): | |||||||
|             try: |             try: | ||||||
|                 AllCard() |                 AllCard() | ||||||
|             except Exception as e: |             except Exception as e: | ||||||
|                 LogError( |                 LogError(f"AllCards - {e} -- override") | ||||||
|                     f"pas normal sauf si relancer a la main, juste pour les recherches bing (DalyRoutine -> AllCard) \n {str(e)}. -- override" |  | ||||||
|                 ) |  | ||||||
|  |  | ||||||
|         if "pc" in Actions: |         if "pc" in Actions: | ||||||
|             try: |             try: | ||||||
| @@ -880,6 +872,12 @@ def CustomStart(Credentials): | |||||||
|             except Exception as e: |             except Exception as e: | ||||||
|                 LogError(f"BingMobileSearch - {e} -- override") |                 LogError(f"BingMobileSearch - {e} -- override") | ||||||
|  |  | ||||||
|  |         if "Fidelite" in Actions: | ||||||
|  |             try : | ||||||
|  |                 Fidelite() | ||||||
|  |             except Exception as e : | ||||||
|  |                 LogError(f"Fidelite - {e} -- override") | ||||||
|  |  | ||||||
|         if "dev" in Actions: |         if "dev" in Actions: | ||||||
|             try: |             try: | ||||||
|                 dev() |                 dev() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user