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

13
V4.py
View File

@ -82,12 +82,12 @@ LogPath = config["PATH"]["logpath"]
"""
discord configuration
"""
SuccessLink = config["DISCORD"]["successlink"]
ErrorLink = config["DISCORD"]["errorlink"]
discord_enabled = config["DISCORD"]["enabled"]
webhookFailure = Webhook.from_url(ErrorLink, adapter=RequestsWebhookAdapter())
if discord_enabled:
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))
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) :
PROXY = f"{ip}:{port}"
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
@ -1002,8 +1009,8 @@ def close():
def dev():
printf("rien en cours de dev")
print(check_ipv4())
def CustomStart(Credentials):
if not IsLinux :