Does anyone know an easy way to parse a webpage's text -> statistics?

hevnsnt

Lifer
Mar 18, 2000
10,868
1
0
-Sorry, posted in OT then I realized it should be here-

Does that make sense?

lets say I have a webpage with the following text

A - 1
A - 1
A - 2
A - 1
A - 1
A - 2

output something like:
A - 1: 67%
A - 2: 34%



 

toeng

Member
Jun 18, 2003
119
0
0
IF the web site is yours and it follows a certain pattern, it's not too hard ... you can use PHP or ASP or CFM to accomplish the task
basically the steps are:
1. reading the web site output (which already follow a certain pattern that you can easily parse)
2. strip the HTML codes
3. read each line and put them into some sort of storage (database or array)
4. sort the data and just do quick calculation :)

that's the skeleton :) ... programming wise, I think it'll take some time to figure out, especially if you are not a programmer.
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
well do you have a more specific example of what kinda text your talking about maybe I am just trying to make this more complicated than it really is.
 

ProviaFan

Lifer
Mar 17, 2001
14,993
1
0
It can be done. I reduce this into a tab-delimited text file to import into a database with some pseudo-regular-expressions in UltraEdit (I'm too lazy to learn real UNIX regular expressions and write a script for it :eek:).
 

kt

Diamond Member
Apr 1, 2000
6,004
1,321
136
Originally posted by: toeng
IF the web site is yours and it follows a certain pattern, it's not too hard ... you can use PHP or ASP or CFM to accomplish the task
basically the steps are:
1. reading the web site output (which already follow a certain pattern that you can easily parse)
2. strip the HTML codes
3. read each line and put them into some sort of storage (database or array)
4. sort the data and just do quick calculation :)

that's the skeleton :) ... programming wise, I think it'll take some time to figure out, especially if you are not a programmer.

I don't see why he will need to store the data if he only need to get the statistics. Just do a string match and keep counts. A Perl script would be ideal for doing something like this since you'll have full access to regular expression.
 

hevnsnt

Lifer
Mar 18, 2000
10,868
1
0
sorry for late reply.. I was gone for the 4th..

example data

click this link here
and then click on the button: Find Teams

I would like to see the top picks of all teams.. etc..
 

ASK THE COMMUNITY