diff --git a/V4.py b/V4.py index 3b14005..ed39c10 100755 --- a/V4.py +++ b/V4.py @@ -7,7 +7,6 @@ from re import findall, search from sys import platform from time import sleep from requests import get -from datetime import timedelta from selenium import webdriver from selenium.common import exceptions from selenium.webdriver.common.by import By diff --git a/modules/config.py b/modules/config.py index 2b86cbc..cec70f7 100644 --- a/modules/config.py +++ b/modules/config.py @@ -59,7 +59,7 @@ else: #reading configuration -config_path = f"{path.abspath( path.dirname( __file__ ) )}/user_data/config.cfg" +config_path = f"{path.abspath(path.dirname(path.dirname( __file__ )))}/user_data/config.cfg" if args.config : config_path = path.abspath(args.config.name) diff --git a/modules/tools.py b/modules/tools.py index df2ff36..2d0a28b 100644 --- a/modules/tools.py +++ b/modules/tools.py @@ -1,4 +1,5 @@ from time import sleep +from datetime import timedelta from random import uniform import discord from discord import ( # Importing discord.Webhook and discord.RequestsWebhookAdapter @@ -7,7 +8,8 @@ from discord import ( # Importing discord.Webhook and discord.RequestsWebhookAd ) from modules.config import * - +global _mail +_mail = "undefined" """ send_keys_wait([selenium element:element, str:keys]) send the different keys to the field element, with a random time between each press to simulate human action. keys can be an string, but alos selenium keys @@ -20,7 +22,7 @@ def send_keys_wait(element, keys): else : sleep(uniform(0.1, 0.3)) -def LogError(message, driver, log=FULL_LOG): +def LogError(message, driver,_mail, log=FULL_LOG): print(f"\n\n\033[93m Erreur : {str(message)} \033[0m\n\n") if DISCORD_ENABLED_ERROR: with open("page.html", "w") as f: