mirror of
				https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
				synced 2025-11-03 23:23:53 +01:00 
			
		
		
		
	déja ca a fix le problème de lancement je pense
This commit is contained in:
		@@ -52,17 +52,14 @@
 | 
				
			|||||||
            </td>
 | 
					            </td>
 | 
				
			||||||
        </tr>
 | 
					        </tr>
 | 
				
			||||||
    </table>
 | 
					    </table>
 | 
				
			||||||
    <table>
 | 
					    <ul>
 | 
				
			||||||
        <tr>
 | 
					        <li>TODO</li>
 | 
				
			||||||
            TODO
 | 
					        <li>reorder config</li>
 | 
				
			||||||
        </tr>
 | 
					        <li>real override</li>
 | 
				
			||||||
        <tr><td>reorder config</td></tr>
 | 
					        <li>ban button</li>
 | 
				
			||||||
        <tr><td>real override</td></tr>
 | 
					        <li>pourquoi tout ne se lance pas bien ?</li>
 | 
				
			||||||
        <tr><td>ban button</td></tr>
 | 
					        <li>logs viewer</li>
 | 
				
			||||||
        <tr><td>database truc</td></tr>
 | 
					    </ul>
 | 
				
			||||||
        <tr><td>pourquoi tout ne se lance pas bien ?</td></tr>
 | 
					 | 
				
			||||||
        <tr><td>logs viewer</td></tr>
 | 
					 | 
				
			||||||
    </table>
 | 
					 | 
				
			||||||
    <br>
 | 
					    <br>
 | 
				
			||||||
    <table>
 | 
					    <table>
 | 
				
			||||||
        <tr><h2>Backup config files</h2></tr>
 | 
					        <tr><h2>Backup config files</h2></tr>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								V6.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								V6.py
									
									
									
									
									
								
							@@ -160,7 +160,6 @@ def play_quiz8():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        log_error(f"{format_error(e)} \n Good answers : {' '.join(correct_answers)}")
 | 
					        log_error(f"{format_error(e)} \n Good answers : {' '.join(correct_answers)}")
 | 
				
			||||||
    printf("play_quiz8 : fin ")
 | 
					 | 
				
			||||||
    custom_sleep(3)
 | 
					    custom_sleep(3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -189,7 +188,6 @@ def play_quiz4(override=None):
 | 
				
			|||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
        log_error(e)
 | 
					        log_error(e)
 | 
				
			||||||
        raise ValueError(e)
 | 
					        raise ValueError(e)
 | 
				
			||||||
    printf("play_quiz4 : end")
 | 
					 | 
				
			||||||
    custom_sleep(3)
 | 
					    custom_sleep(3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -206,7 +204,6 @@ def do_poll():
 | 
				
			|||||||
    except Exception as error:
 | 
					    except Exception as error:
 | 
				
			||||||
        log_error(error)
 | 
					        log_error(error)
 | 
				
			||||||
        raise ValueError(error)
 | 
					        raise ValueError(error)
 | 
				
			||||||
    printf("do_poll : end")
 | 
					 | 
				
			||||||
    custom_sleep(3)
 | 
					    custom_sleep(3)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -567,6 +564,7 @@ def log_points(account="unknown"):
 | 
				
			|||||||
        driver.get("https://rewards.bing.com")
 | 
					        driver.get("https://rewards.bing.com")
 | 
				
			||||||
        custom_sleep(1)
 | 
					        custom_sleep(1)
 | 
				
			||||||
        if "/proofs/" in driver.current_url:
 | 
					        if "/proofs/" in driver.current_url:
 | 
				
			||||||
 | 
					            webhookFailure.send(f"Is /proof Useful in logpoints?", username="Dev tests", avatar_url="https://cdn.discordapp.com/attachments/793934298977009677/1144560898879541268/image.png")
 | 
				
			||||||
            for id in ["KmsiCheckboxField","iLooksGood", "idSIButton9", "iCancel"]:
 | 
					            for id in ["KmsiCheckboxField","iLooksGood", "idSIButton9", "iCancel"]:
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    driver.find_element(By.ID, id).click()
 | 
					                    driver.find_element(By.ID, id).click()
 | 
				
			||||||
@@ -609,7 +607,6 @@ def log_points(account="unknown"):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            webhookSuccess.send(f"{account_name} actuellement à {str(points)} points")
 | 
					            webhookSuccess.send(f"{account_name} actuellement à {str(points)} points")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if g.sql_enabled :
 | 
					 | 
				
			||||||
    try :
 | 
					    try :
 | 
				
			||||||
        add_to_database(account_name, points)
 | 
					        add_to_database(account_name, points)
 | 
				
			||||||
    except Exception as e:
 | 
					    except Exception as e:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,8 +63,7 @@ with open("/app/MsRewards-Reborn/user_data/proxy.json", "r") as inFile:
 | 
				
			|||||||
    proxy = json.load(inFile)
 | 
					    proxy = json.load(inFile)
 | 
				
			||||||
with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
 | 
					with open("/app/MsRewards-Reborn/user_data/configs.json", "r") as inFile:
 | 
				
			||||||
    config = json.load(inFile)
 | 
					    config = json.load(inFile)
 | 
				
			||||||
with open("/app/MsRewards-Reborn/user_data/database.json", "r") as inFile:
 | 
					
 | 
				
			||||||
    database = json.load(inFile)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
args = parser.parse_args()
 | 
					args = parser.parse_args()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -114,19 +113,6 @@ if g.proxy_enabled :
 | 
				
			|||||||
    g.proxy_address = proxy[config[args.config]["proxy"]]["address"]
 | 
					    g.proxy_address = proxy[config[args.config]["proxy"]]["address"]
 | 
				
			||||||
    g.proxy_port = proxy[config[args.config]["proxy"]]["port"]
 | 
					    g.proxy_port = proxy[config[args.config]["proxy"]]["port"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# MySQL settings
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
g.sql_enabled = database["checked"] == "checked"
 | 
					 | 
				
			||||||
g.sql_usr = database["usr"]
 | 
					 | 
				
			||||||
g.sql_pwd = database["pwd"]
 | 
					 | 
				
			||||||
g.sql_host = database["host"]
 | 
					 | 
				
			||||||
g.sql_database = database["table"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
try :
 | 
					 | 
				
			||||||
    g.database_error_override = config["OTHER"]["database_override"] == "True"
 | 
					 | 
				
			||||||
except :
 | 
					 | 
				
			||||||
    pass
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
g.fast = False
 | 
					g.fast = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
import sqlite3
 | 
					import sqlite3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Create a new row, for the account [compte] whith [points] points
 | 
					#Create a new row, for the account [compte] whith [points] points
 | 
				
			||||||
#SQLITE
 | 
					 | 
				
			||||||
def add_row(compte, points, mycursor, mydb):
 | 
					def add_row(compte, points, mycursor, mydb):
 | 
				
			||||||
    sql = "INSERT INTO daily (compte, points, date) VALUES (?, ?, date())"
 | 
					    sql = "INSERT INTO daily (compte, points, date) VALUES (?, ?, date())"
 | 
				
			||||||
    val = (compte, points)
 | 
					    val = (compte, points)
 | 
				
			||||||
@@ -11,7 +10,6 @@ def add_row(compte, points, mycursor, mydb):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#update the ammount of points for the account [compte] 
 | 
					#update the ammount of points for the account [compte] 
 | 
				
			||||||
#SQLITE
 | 
					 | 
				
			||||||
def update_row(compte, points, mycursor, mydb):
 | 
					def update_row(compte, points, mycursor, mydb):
 | 
				
			||||||
    sql = f"UPDATE daily SET points = {points} WHERE compte = '{compte}' AND date = date() ;"
 | 
					    sql = f"UPDATE daily SET points = {points} WHERE compte = '{compte}' AND date = date() ;"
 | 
				
			||||||
    mycursor.execute(sql)
 | 
					    mycursor.execute(sql)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
{}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user