STILL
This commit is contained in:
parent
3bebee9c13
commit
66c979c624
31
V4.py
31
V4.py
@ -93,24 +93,10 @@ g = open(MotPath, "r", encoding="utf-8")
|
|||||||
Liste_de_mot = list(g.readline().split(","))
|
Liste_de_mot = list(g.readline().split(","))
|
||||||
g.close()
|
g.close()
|
||||||
|
|
||||||
if discord_enabled:
|
|
||||||
webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter())
|
|
||||||
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
|
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
|
||||||
|
|
||||||
|
|
||||||
def setup_proxy(ip, port) :
|
|
||||||
PROXY = f"{ip}:{port}"
|
|
||||||
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
|
|
||||||
"httpProxy": PROXY,
|
|
||||||
"sslProxy": PROXY,
|
|
||||||
"proxyType": "MANUAL",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if sql_enabled :
|
|
||||||
mycursor = setup_MySQL()
|
|
||||||
|
|
||||||
|
|
||||||
def setup_MySQL():
|
def setup_MySQL():
|
||||||
mydb = mysql.connector.connect(
|
mydb = mysql.connector.connect(
|
||||||
host=sql_host,
|
host=sql_host,
|
||||||
@ -120,6 +106,21 @@ def setup_MySQL():
|
|||||||
)
|
)
|
||||||
return(mydb.cursor())
|
return(mydb.cursor())
|
||||||
|
|
||||||
|
|
||||||
|
if sql_enabled :
|
||||||
|
mycursor = setup_MySQL()
|
||||||
|
if discord_enabled:
|
||||||
|
webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter())
|
||||||
|
|
||||||
|
def setup_proxy(ip, port) :
|
||||||
|
PROXY = f"{ip}:{port}"
|
||||||
|
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
|
||||||
|
"httpProxy": PROXY,
|
||||||
|
"sslProxy": PROXY,
|
||||||
|
"proxyType": "MANUAL",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def add_row(compte, points):
|
def add_row(compte, points):
|
||||||
sql = "INSERT INTO daily (compte, points, date) VALUES (%s, %s, current_date())"
|
sql = "INSERT INTO daily (compte, points, date) VALUES (%s, %s, current_date())"
|
||||||
val = (compte, points)
|
val = (compte, points)
|
||||||
|
Loading…
Reference in New Issue
Block a user