FuriousElf Posted December 20, 2006 Share Posted December 20, 2006 I was wondering how I could make a method that gets the level from a player in a certain skill. Can someone explain me that? It would be even better if someone could post a pre-made one, I found out I learn the best by viewing examples. Link to comment Share on other sites More sharing options...
Cruiser Posted December 20, 2006 Share Posted December 20, 2006 Using the highscores URL, replace with the rsn you want to look up. Open the URL through your code, strip the HTML and then work with the bare text to find the info you need. http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1= I've never done this in Java so I don't know the specifics but the methods for getting to the info are the same. Link to comment Share on other sites More sharing options...
Olgath Posted December 21, 2006 Share Posted December 21, 2006 I have a method written in perl, not java, but the concept is the same. It really all boils down to the parsing and how much detail you intend to pull out. Also, whenever RS changes the way their page is formatted, you will have to updated your parsing, since it may or may not hold. The current regular expression I use has held up pretty good. I had to modify it recently to include line breaks: $content =~ /$_.*?\>(\d{2}|Not Ranked)\; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now