Results 1 to 4 of 4
  1. psvillars's Avatar
    Posts
    82 Posts
    Global Posts
    86 Global Posts
       #1  
    Hi I'm looking to make a simple sports score app and what I want to do is to take the information from one of espn's bottomline sites and convert it into a simple table when i enter the url this is what I get:
    &nba_s_delay=120&nba_s_stamp=1218044215&nba_s_left1=New%20York%2089%20%20%20^Chicago%2098%20(FINAL)& nba_s_right1_1=C.%20Duhon%2018pts,%207ast,%203reb&nba_s_right1_2=L.%20Deng%2024pts,%205ast,%2013reb& nba_s_right1_3=D.%20Gallinari%206-15%20three%20pointers&nba_s_right1_count=3&nba_s_url1=http://sports.espn.go.com/nba/boxscore?gameId=291217004&nba_s_left2=Orlando%2086%20%20%20^Miami%20104%20(FINAL)&nba_s_right2_1=D.% 20Howard%2017pts,%200ast,%2014reb&nba_s_right2_2=D.%20Wade%2025pts,%207ast,%203reb&nba_s_right2_coun t=2&nba_s_url2=http://sports.espn.go.com/nba/boxscore?gameId=291217014&nba_s_left3=Phoenix%20102%20%20%20^Portland%20105%20(FINAL)&nba_s_right3_1 =S.%20Nash%2016pts,%2013ast,%205reb&nba_s_right3_2=B.%20Roy%2027pts,%204ast,%208reb&nba_s_right3_3=C .%20Frye%205-8%20three%20pointers&nba_s_right3_count=3&nba_s_url3=http://sports.espn.go.com/nba/boxscore?gameId=291217022&nba_s_count=3&nba_s_loaded=true

    obviously that's not easy to read so what I like to do is to turn that data into something easily read. I'm very limited on what i know so make it as dumbed down as possible lol thanks in advance
  2. #2  
    I think the best way to do this would be to create a website using PHP, and use PHP to parse the string (which would be trivial), then use AJAX from WebOS to get the text string from your PHP driven website. Sorry your answer is not "dumbed" down enough but that's all the time I have right now.

    This is not to say that you can't parse the string in Javascript. You can do it there as well.
    mobigamedepot.com
  3. psvillars's Avatar
    Posts
    82 Posts
    Global Posts
    86 Global Posts
       #3  
    ok i found a rss.php file that does the parsing but I'd like to do it in javascript so that i can import it into my app, I'm trying to create a scoreboard app and this is a major roadblock lol
    Last edited by psvillars; 12/21/2009 at 06:56 AM.
  4. #4  
    For sports score app, you can consider the sample script - SS_WebPageToText . It is a sample script that comes with biterscripting. You execute it by calling it as follows.


    Code:
    script ss_webpagetocsv.txt page("http ://sports.espn.go.com/nba/boxscore?gameId=291217004&nba_s_left2=Orlando%2086%20%20%20^Miami%20104%20(FINAL)&nba_s_right2_1=D.% 20Howard%2017pts,%200ast,%2014reb&nba_s_right2_2=D.%20Wade%2025pts,%207ast,%203reb&nba_s_right2_coun t=2")

    I just tried the above, and got the following in under a second.

    NYK (8-17) , 34 , 16 , 22 , 17 , 89 ,
    CHI (9-15) , 23 , 25 , 21 , 29 , 98 ,

    The script takes its input from a web page or a local file, or an RSS feed, or some source - doesn't matter in what format and from where, and extracts data from it, and puts it in a CSV (Comma Separated Values) format. I am not a betting man myself, but I have friends who use it.

    The one things I like about biterscripting is that it comes with some very good sample pre-made scripts. One can use them as they are (like I am doing above) or one can fine-tune them further.

Posting Permissions