New Scaratings
https://scaratings.com/newScaratings/

Buzztime data
https://scaratings.com/newScaratings/viewtopic.php?f=43&t=171
Page 1 of 1

Author:  Pink Pig [ Sun Jan 24, 2010 6:24 pm ]
Post subject:  Buzztime data

This may be a complete waste of time, because I am chasing a moving target, but there's still a lot of useful info in the BT database which I'd like to help others gain access to.

The typical mechanism for accessing web data for further processing is an Excel web query. There may be other methods using other tools, but this is the only one I am familiar with. You can execute an Excel query either manually or automatically. Manual mode is useful when you are exploring. From an Excel screen, select Data/Import External Data/New Web Query, supply a URL as a starting point, and browse away. The web page as displayed is fully functional (as long as you are used to IE), so you can easily link from one page to another. The query applies to the current page under view. A couple of details. Under Options/formatting, there are 3 choices. I usually use the last of these (full HTML formatting); this means that links on the source page are imported as is, which allows me (with the aid of a macro) to extract the text of the link, rather than the description of the link. The first option (none) suppresses the text of the link, so that all that shows up is the description. The middle option is some sort of hybrid that I've never used. After you click Import on the main query display, it will ask you where you want to put (the top-left corner of) the result. By default, you will get a copy of the entire page, but you can also select a specific table to import.

There's also an automatic mode for canned queries. Canned queries are just text files in which certain lines are expected to contain certain information. Here's a canned query to extract the player name table from the Mad River site page:

***
WEB
1
http://www.buzztime.com/site/11037/players

Selection=sortTable
Formatting=All
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False
***

Here's what it means. The first line should just consist of the line "WEB", and the second line should consist of the number "1". I'm not sure how these values are used, but I haven't tried to figure it out. The third line is the URL of the web page being queried. 11037 is the site ID for Mad River -- if you replace it with a different value, you will get the list of players at a different location. The 4th line should always be blank (I think). The line "Selection=sortTable" supplies the name of the table to be selected from the URL (for now, called sortTable, but BT may change this at any time). The line "Formatting=All" selects full HTML formatting. I think "Formatting=None" would turn it off, but I'm not entirely sure. The remaining lines are the default values of other options. I haven''t done much experimenting, but I think you can omit any line containing a default value.

If you create this canned query file (say, with Wordpad), you can call it from Excel by Data/Import External Data/Import Data, then browsing for the canned query which you previously saved on your disk somewhere.

I know it should be possible also to write a macro to execute a canned query with parameters, so that it could be called via a user-defined function like =PlayerList(<siteid>), but I haven't got that far .. maybe later this week. At a minimum, it is always possible to automate the process of writing .iqy files.

Anyway, enough of that for now.

You may have noticed that the URLs that show up at the BT site often have parameters associated with them. A typical parameter is of the form 'pid=nnnnnn' to identify a registered player. These parameters are subjecct to change (I wouldn't expect them to be cast in concrete), but here is a list of some BT pages and the associated parameters. Note that there used to be two independent and unrelated player IDs, one of the form 'pid=' and one of the form 'u='. The 'u=' form appears to have vanished. At that time, it was possible for players to be registered P+ players independently of web site registration. This is no longer the case, so a single ID ought to be sufficient.

BT page = bt_profile.php: this is the file that manages almost all of the displays of information specific to a given pllayer. There is one main parameter: pid=nnnnnn, which identifies the player whose profile is being shown. By default, this is you. PNKPIG is 213317, which is where you are taken if you execute a search for the handle PNKPIG. The main profile page has 5 tabs on it (for now). These correspond to the parameter tn= as follows:

  • tn=overall shows the 'overall' tab
  • tn=trivia shows the 'trivia' tab
  • tn=sports shows the 'sports' tab
  • tn=casual shows the 'casual' tab
  • tn=rewards shows the 'players reward' tab

When it is necessary to identify the desired reward card, the parameter is cardid=nn, where nn = 57+card#.

When it is necessary to identify a specific BT game, the parameter is 'd=nn', where nn is a game ID from the following:

  • 0 shows last 50 games of any type (default)
  • 2 Wipeout (old)
  • 9 Raceday
  • 11 Showdown
  • 12 Sports Trivia Challenge
  • 14 Sports IQ
  • 19 Speed
  • 46 Spotlight
  • 57 Ask It Already
  • 60 Buzztime Trivia
  • 61 Lexitopia
  • 62 Immortal Words
  • 63 Tuned In
  • 66 Nth Degree (15 min.)
  • 71 Pastimes (15 min.)
  • 75 Showdown-Canada
  • 78 Speed Freaks
  • 83 Cross Checked
  • 84 Six
  • 85 Playback
  • 87 Countdown
  • 88 Lunchtime Trivia
  • 89 Topix
  • 90 Brainbuster (30 min.)
  • 91 Glory Daze (30 min.)
  • 92 SciFiles
  • 93 25 Years of Sports 30min
  • 94 25 Years of Sports 60min
  • 98 Sports Trivia

I'm not entirely sure what happens if you use a code not listed here, or one that is inappropriate for the query you are making.

There are at least two other systems for identifying games which have been developed at BT for various purposes. They appear as follows. The page bt_hof_games.php erquires a game ID of the form 'gid=nnn', whose encoding is entirely different (I have a file which lists it, but it may change, particularly in light of the following). The site pages have been completely revamped. The format of site page URLs is now http://www.buzztime.com/site/nnnnn/gameid/nnn, where the first nnnnn is the site ID of the corresponding site, and the second nnn is a game ID whose encoding is completely different from either of the foregoing. (It may be necessary to write '...site/nnnnn/games/gameid/nnn" to get the correct display.) Note that the bt_averages.php page uses the same encoding for games as the bt_profile.php page, except that it is called 'gid=' instead of 'd='.

A lot of this may change, and soon.

A few other details. When there is an option to control the number of lines shown per page, the corresponding parameter is 's=nnnn', where nnnn can take the values 200, 500 or 1000; any other value will be taken to be the default 200. This works even where it is not documented, e.g. on the bt_pp_leaders.php page, which can therefore be requested in the form '...bt_pp_leaders.php?s=1000' to get the top 1000 PP leaders. The other way of accomplishing the same thing is to use the 'p=n' parameter to select a specific section (page) to display.

I'll leave it at that for now, given that it may all be changed by tomorrow.

Author:  ANON [ Sun Jan 24, 2010 8:20 pm ]
Post subject:  Re: Buzztime data

Thank you so much for taking the time to relate all this to us--it will be extremely helpful (as long as it doesn't change). Much obliged!

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/