Hello , When i try this code , my selenium stucks at the discord loading screen.(i am checking the screen with screenshot method.
Thanks
from selenium import webdriver
from selenium.webdriver.common.by import By
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
import time
driver = webdriver.Chrome(options=chrome_options)
driver.get("http://discord.com/login")
print("waiting")
time.sleep(10)
komut = """function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token =
`"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
login('discord token here')"""
driver.execute_script(komut)
print("executed")
time.sleep(5)
driver.get("http://discord.com/channels/@me")