SRL Archive - Help

Help grabbing runescape hiscore information for excel speadsheet!


YoHoJo

2011-09-19 14:43:26

Hey I want to grab hiscore info (like levels for a particular skill) from the Runescape hiscore page and show them in a excel spreadsheet, how do?

bevardis

2011-09-19 14:53:55

I tried it and didn't workout with latest runescape hiscores. It did work for google docs tho. There are tutorials in the web for the latter.

Boreas

2011-09-20 03:08:44

for googledocs
=Index(ImportXml(Concat("http://services.runescape.com/m=hiscore/compare.ws?user1=",B7), "//<span>"),B6)

B7 is user name, B6 is a number between 40 and at least 100. Unless there is a different way to view hiscores, the trouble is that the html code isn't using a <table> or something else ImportHTML can look at (like the item price stuff does). I don't know how complex the parameter for ImportXml can be, but when it's //span it will return an array of the contents of <span>123</span>. B6 being the index of that array. Unfortunately, when a player is not ranked for a skill, the page uses less of those span tags, so you can't predict which index will refer to mage level.

YoHoJo

2011-09-20 03:17:48

So what is B6 exactly again? Why number between 40 and 100?
And I'm completely lost about //<span> part!

Boreas

2011-09-20 21:19:53

B6 and B7 are cells in the spreadsheet that contain a number and a username.

Go here http://services.runescape.com/m=hiscore/compare.ws?user1=zezmia and view page source. Ctrl+F for whatever the total level is, and you will see it is between <span> and </span>. If you put the right number in B6, you will get that level. If you put in a different number for B6, you will get something in between a different pair of <span> and </span>.

From what I understand, the ImportXML, when used with "//<span>" as the second parameter (and URL as the first), returns an array. Each element in the array is the contents of a span block. Index then returns one of them (whichever number is in B6).

nickrules

2011-09-20 23:29:55

Im on my mobile, so this wont be the best, but have you considered using getPage(page:string):string;? Then using string manipulation, get the data you want.


Also, somebody made a freerice script a looong time ago. Point is, it used this same method. Look it up, and see if you can gain anything of use from that

Boreas

2011-09-21 00:09:03

Do you need them to be created _in_ the spreadsheet, or writeln them in Simba and then paste into spreadsheet?