Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib2
- import re
- print "---------------------------------"
- print "The Minecraft Resolver"
- print "Coded By ADHD"
- print "---------------------------------"
- print "[1]Username to UUID"
- print "[2]UUID to Username"
- print "---------------------------------"
- choice = raw_input("What would you like to do?:")
- print "---------------------------------"
- if choice == "1":
- username = raw_input("Username:")
- uuidurl = "https://api.mojang.com/users/profiles/minecraft/" + username
- infoname = urllib2.urlopen(uuidurl).read(40)
- infoname = re.sub('[{"id"]', '', infoname)
- UUIDText = "UUID" + infoname
- print "---------------------------------"
- if UUIDText == "UUID" : print "Error try again!"
- print(UUIDText)
- print "---------------------------------"
- elif choice == "2":
- uuid = raw_input("UUID:")
- usernameurl = "https://api.mojang.com/user/profiles/" + uuid + "/names"
- infouuid = urllib2.urlopen(usernameurl).read()
- infouuid = re.sub('["]', '', infouuid)
- UsernameText = "Username:" + infouuid
- print "---------------------------------"
- if UsernameText == "Username:" :
- print "Error try again!"
- else :
- print(UsernameText)
- print "---------------------------------"
- else :
- print "That is not a valid choice!"
- print "---------------------------------"
- ###Contact me on my XMPP: adhd@dukgo.com ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement