- Joined
- Jan 21, 2007
- Sythe Gold
- 1,234
- Messages
- 14,211
I have made a program that should download and dump the contents of every Runescape username's lite highscores into a single text file which can be parsed later. I am currently testing it, and hoping Jagex will not IP block me. I will post the code if all goes well.
Ok, Here is my fail code. I may try and make it less fail, but it seems that there are too many damned usernames to make this work well... Lol...
EDIT: I am getting scared I will use up my entire hard drive space doing this, but o well... If someone feels like calculating it for me, go ahead as I am to lazy. I am using 26 letters, 10 numbers and space.
EDIT 2: Ok, I have fixxed a few minor errors, and have decided not to write the info to the file if it is not on the RS highscores. So I am starting again.
EDIT 3: Fixxed a few errors that fixxing the other errors caused. Time to test again...
EDIT 4: This is going to take like 2 weeks to do. Lol... Thats just a bit too much fail....
Ok, Here is my fail code. I may try and make it less fail, but it seems that there are too many damned usernames to make this work well... Lol...
Code:
package suf;
import java.net.*;
import java.io.*;
import java.util.*;
public class AllUserDownloader
{
static Scanner s = new Scanner(System.in);
public static String[] letters =
{"", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4",
"5", "6", "7", "8", "9", "0", " " **;
public static int[] hold =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 **;
public static void main(String[] args)
{
System.out.print("Welcome to SuF's All User Stats Downloader! \nWhen you are ready to start the process type 'Start':");
while (true)
{
if (s.next().equalsIgnoreCase("Start"))
{
System.out.print("Starting! \nThis may take awhile, so please leave the program open untill it says it is done!");
break;
**
else
{
System.out.print("Type 'Start' when you are ready to begin the process.");
**
**
while (true)
{
hold[0]++;
if (hold[0] == 37)
{
hold[0] = 1;
hold[1]++;
if (hold[1] == 37)
{
hold[1] = 0;
hold[2]++;
if (hold[2] == 37)
{
hold[2] = 0;
hold[3]++;
if (hold[3] == 37)
{
hold[3] = 0;
hold[4]++;
if (hold[4] == 37)
{
hold[4] = 0;
hold[5]++;
if (hold[5] == 37)
{
hold[5] = 0;
hold[6]++;
if (hold[6] == 37)
{
hold[6] = 0;
hold[7]++;
if (hold[7] == 37)
{
hold[7] = 0;
hold[8]++;
if (hold[8] == 37)
{
hold[8] = 0;
hold[9]++;
if (hold[9] == 37)
{
hold[9] = 0;
hold[10]++;
if (hold[10] == 37)
{
hold[10] = 0;
hold[11]++;
if (hold[11] == 37)
{
break;
**
**
**
**
**
**
**
**
**
**
**
**
String player = letters[hold[0]] + letters[hold[1]] + letters[hold[2]] + letters[hold[3]] + letters[hold[4]] + letters[hold[5]] + letters[hold[6]]
+ letters[hold[7]] + letters[hold[8]] + letters[hold[9]] + letters[hold[10]] + letters[hold[11]];
try
{
write(player,connect(new URL("http://hiscore.runescape.com/index_lite.ws?player=" + player)));
**
catch (MalformedURLException e)
{
**
**
System.out.println("DONE!");
**
public static String connect(URL site)
{
String data = "";
while (true)
{
try
{
String html;
BufferedReader in = new BufferedReader(new InputStreamReader(site.openStream()));
while ((html = in.readLine()) != null)
{
if (data.equals(""))
{
data = html;
**
else
{
data = data + "," + html;
**
**
return (data);
**
catch (MalformedURLException exc)
{
return "-2";
**
catch (IOException exc)
{
return "-2";
**
**
**
public static void write(String name, String stats)
{
try
{
if(stats.equalsIgnoreCase("-2"))
{
**
else
{
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("Dump.txt", true)));
out.print(name + "," + stats + ",");
out.close();
**
**
catch (IOException e)
{
**
**
**
EDIT: I am getting scared I will use up my entire hard drive space doing this, but o well... If someone feels like calculating it for me, go ahead as I am to lazy. I am using 26 letters, 10 numbers and space.
EDIT 2: Ok, I have fixxed a few minor errors, and have decided not to write the info to the file if it is not on the RS highscores. So I am starting again.
EDIT 3: Fixxed a few errors that fixxing the other errors caused. Time to test again...
EDIT 4: This is going to take like 2 weeks to do. Lol... Thats just a bit too much fail....












