Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Getting levels from highscores in java.

Featured Replies

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.

wccape,Furious%20%20Elf.gif

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.

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)\;

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.