Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

304
Views
How to log in to Discord using token and selenium (python)

I wrote a code in Python using selenium model to log in to discord by token number.

token number must be added to localStorage, so I ran javascript code to add the token and It's added, but when I go to Application -> localStorage -> https://discord.com I am not able to see the token key and its value. Even when I refresh the page I cannot log in, but when I added it manually I can log in when I refresh the page.

Note: I used this line of code to add token to localStorage

driver.execute_script('return window.localStorage.setItem("token", "value");')

Any help would be appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use

function login(token) {
    setInterval(() => {
      document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
    }, 50);
    setTimeout(() => {
      location.reload();
    }, 2500);
  }

login(token);

Inside the selenium execute_script()

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!