0

There's a website www.runescape.com and I'm trying to find a way to login the site and automate entering 2-3 letter words (from a-z0-9) to find a unique list of available usernames. (https://secure.runescape.com/m=displaynames/name.ws)

This is the only page I know of where you can view usernames that are available or taken.

In the form where you change your name--you type in a name and it queries it for you with no form submit needed. In about a second or two, the page will display a lime green "Available" or a red "Not available" in text.

Is there a way in java where I can login to see this page, then enter in values, and read if username(s) are Available or Not available? Can someone help point me in the right direction to do this?

Much appreciation.

Kyle
  • 2,830
  • 14
  • 49
  • 73

1 Answers1

1

By viewing the source code of the web site, I can see that the form is sent via POST to https://secure.runescape.com/m=weblogin/login.ws. You will want to send an HTTP Request to that address with the associated username and password parameters respectively.

There's a Java HTTP Request tutorial on SO Here: Using java.net.URLConnection to fire and handle HTTP requests

After you've sent the HTTP Request to the page, an HTTP Response object should be returned to you that has the body of the entire web page that you're looking for. Most likely, you'll need to use RegEx to scan through the body of text and filter out the data you want e.g. <li>([a-z0-9]{1,20})<\/li>

Handling the HTTP Response object is also available on the link provided.

Community
  • 1
  • 1
Gio Borje
  • 16,826
  • 7
  • 33
  • 50