The rest should look similar to this: headers = ) I have already done something similar, the OAuth method works by generating a link that if accessed by the client gives him a unique login to the service, so you can just create a requests session that accesses that specific, how to get that link?įirst of all you need the direct call to the discord api (this format ) you will find it when inspecting the network of a real successful login. The goal is to automate logging in via this link by using python requests only. You can open an account and Login into your account on discord if you are 13. When you click authorize it sends you via a callbackURL to the site on question. Discord is the ideal place to create accounts and hang out with online friends. Api endpoints are a much better way of doing it. I know I could use selenium, but selenium isn't great for performance, as well as websites constantly changing UI. Anton Orlov 41 Followers Full-Stack JS Dev. Refresh the page, check Medium ’s site status, or find something interesting to read. Is there a way I can get around this? For example initializing the JS file (Simulating that I clicked the authorize button in some way or another?) Sign up Sign In 500 Apologies, but something went wrong on our end. Unfortunately I do not know of a way to get this code since it cannot be monitored in network tab. Instead when the button is clicked there is some obfuscated JS file which redirects the user to the oauth call-back URL with a generated code. However, the issue I am facing is that Discord's authorize button doesn't return the oauth code via requests. I have gotten to the stage where I have monitored the requests being made to discord (which contains the sites call-back URL. I'm trying to automate a login on a popular website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |