test smth

This commit is contained in:
piair 2022-06-17 07:10:32 +02:00
parent 0f5c64f9d3
commit ba70727b02
1 changed files with 10 additions and 3 deletions

11
V4.py
View File

@ -82,12 +82,12 @@ LogPath = config["PATH"]["logpath"]
""" """
discord configuration discord configuration
""" """
SuccessLink = config["DISCORD"]["successlink"] SuccessLink = config["DISCORD"]["successlink"]
ErrorLink = config["DISCORD"]["errorlink"] ErrorLink = config["DISCORD"]["errorlink"]
discord_enabled = config["DISCORD"]["enabled"] discord_enabled = config["DISCORD"]["enabled"]
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter()) webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
if discord_enabled: if discord_enabled:
webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter()) webhookSuccess = Webhook.from_url(SuccessLink, adapter=RequestsWebhookAdapter())
@ -121,6 +121,13 @@ def Timer(text="undefined"):
return(f"[{timedelta(seconds = round(float(time() - start_time)))}] : " + str(text)) return(f"[{timedelta(seconds = round(float(time() - start_time)))}] : " + str(text))
def check_ipv4():
driver.get("https://api64.ipify.org")
if len(driver.page_source.split('.')) == 4 :
return True
return False
def setup_proxy(ip, port) : def setup_proxy(ip, port) :
PROXY = f"{ip}:{port}" PROXY = f"{ip}:{port}"
webdriver.DesiredCapabilities.FIREFOX['proxy'] = { webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
@ -1002,7 +1009,7 @@ def close():
def dev(): def dev():
printf("rien en cours de dev") print(check_ipv4())
def CustomStart(Credentials): def CustomStart(Credentials):