update
This commit is contained in:
parent
85b581a536
commit
aab845d65f
43
V4.py
43
V4.py
@ -24,14 +24,13 @@ import argparse
|
|||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
parser.add_argument("-o" , "--override", help="override", dest="override", action = "store_true")
|
parser.add_argument("-o" , "--override", help="override", dest="override", action = "store_true")
|
||||||
parser.add_argument("-l", "--log",dest="log",help="enable full logging in terminal", action ="store_true")
|
parser.add_argument("-l", "--log",dest="log",help="enable logging in terminal", action ="store_true")
|
||||||
|
parser.add_argument("-fl", "--fulllog",dest="fulllog",help="enable full logging in terminal", action ="store_true")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
override = args.override
|
override = args.override
|
||||||
Log = args.log
|
Log = args.log
|
||||||
|
FullLog = args.fulllog
|
||||||
main = True
|
|
||||||
|
|
||||||
|
|
||||||
IsLinux = platform == "linux"
|
IsLinux = platform == "linux"
|
||||||
print("Linux : "+ str(IsLinux))
|
print("Linux : "+ str(IsLinux))
|
||||||
@ -96,6 +95,8 @@ def printf(txt, end=""):
|
|||||||
if Log :
|
if Log :
|
||||||
print(txt, end=end)
|
print(txt, end=end)
|
||||||
CustomSleep(5)
|
CustomSleep(5)
|
||||||
|
if FullLog :
|
||||||
|
LogError(txt)
|
||||||
|
|
||||||
|
|
||||||
def CustomSleep(temps):
|
def CustomSleep(temps):
|
||||||
@ -135,7 +136,6 @@ def LogError(message,log = Log, Mobdriver = None):
|
|||||||
else :
|
else :
|
||||||
gdriver = driver
|
gdriver = driver
|
||||||
|
|
||||||
|
|
||||||
print(f'\033[93m Erreur : {str(message)} \033[0m')
|
print(f'\033[93m Erreur : {str(message)} \033[0m')
|
||||||
if IsLinux :
|
if IsLinux :
|
||||||
with open('page.html', 'w') as f:
|
with open('page.html', 'w') as f:
|
||||||
@ -143,26 +143,18 @@ def LogError(message,log = Log, Mobdriver = None):
|
|||||||
|
|
||||||
gdriver.save_screenshot("screenshot.png")
|
gdriver.save_screenshot("screenshot.png")
|
||||||
|
|
||||||
if embeds :
|
embed = discord.Embed(
|
||||||
embed = discord.Embed(
|
title="An Error has occured",
|
||||||
title="An Error has occured",
|
description=str(message),
|
||||||
description=str(message),
|
url = ListTabs(Mdriver=Mobdriver)[0],
|
||||||
url = ListTabs(Mdriver=Mobdriver)[0],
|
colour = Colour.red()
|
||||||
colour = Colour.red()
|
)
|
||||||
)
|
file = discord.File("screenshot.png")
|
||||||
file = discord.File("screenshot.png")
|
embed.set_image(url="attachment://screenshot.png")
|
||||||
embed.set_image(url="attachment://screenshot.png")
|
embed.set_footer(text=_mail)
|
||||||
embed.set_footer(text=_mail)
|
webhookFailure.send(embed=embed, file=file)
|
||||||
webhookFailure.send(embed=embed, file=file)
|
webhookFailure.send(file=discord.File('page.html'))
|
||||||
webhookFailure.send(file=discord.File('page.html'))
|
|
||||||
else :
|
|
||||||
webhookFailure.send(content="------------------------------------\n" + _mail)
|
|
||||||
webhookFailure.send(ListTabs(Mdriver=Mobdriver))
|
|
||||||
webhookFailure.send(str(message))
|
|
||||||
CustomSleep(1)
|
|
||||||
webhookFailure.send(file=discord.File('screenshot.png'))
|
|
||||||
webhookFailure.send(file=discord.File('page.html'))
|
|
||||||
webhookFailure.send("------------------------------------")
|
|
||||||
|
|
||||||
|
|
||||||
def progressBar(current, total=30, barLength = 20, name ="Progress"):
|
def progressBar(current, total=30, barLength = 20, name ="Progress"):
|
||||||
@ -800,7 +792,6 @@ if override :
|
|||||||
else :
|
else :
|
||||||
for i in Credentials :
|
for i in Credentials :
|
||||||
|
|
||||||
|
|
||||||
_mail =i[0]
|
_mail =i[0]
|
||||||
_password = i[1]
|
_password = i[1]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user