View Single Post
Old 12-22-2007, 06:54 AM   #11 (permalink)
Big W Powah!
You pussies can -interwebs better than that.
 
Join Date: Jan 2003
Location: Earth
Posts: 2,025
-51 Internets
Quote:
Originally Posted by Niceshot23 View Post
seeing that this is a development assignment ... im not sure if your teacher would cut you slack on grabbing that data from somewhere other then parsing it yourself .... anyway, the code below is just an eagles eye point of view of how easy the project is ..... the only thing thats difficult about this is that its tideous ... not that its difficult ... oh, and unless im missing something, i dont see a place where the umpire or weather related data is stored on espn so thats not a possibility ... you can only get what you can....



'historical data
private sub StartParse()

dim intYear as integer
dim intWeek as integer
dim iYear as integer
dim iWeek as integer

intYear = 2005
intWeek = 1

for iYear = intYear to 2006
for iWeek = intWeek to 17
call GetGames("http://scores.espn.go.com/nfl/scoreboard?weekNumber=" & intWeek & "&seasonYear=" & intYear & "&seasonType=2"
next iWeek
next iYear

end sub

private sub GetGames(strPage as string)

dim strGameID as string
dim strGameURL as string

dim intStart as long
dim intEnd as long

strGameURL = "http://scores.espn.go.com/nfl/boxscore?gameId="

'on this page, parse for every "http://scores.espn.go.com/nfl/boxscore?gameId=" get the id and put it into strGame ID inside a Loop
strGameID = 250911002

call ParseGame(strGameURL & strgameid)

end sub

Private sub ParseGame(strGameURL as string)

'parse the game .... the webbrowser control gives you the html to the whole page ... thats what you need to parse ... everything on this page follows patterns so parsing it is not hard


end sub
Sorry about the lack of updates; thanks guys, this has been helpful as hell. Been working like a busy bee, and by around noon, thanks to you guys, I should have a wokring prototype.

Also: This is a development project for a non-development class--We just need an ability to automate 3 seasons worth of football being entered into an access database, which will then be migrated to a MSSQL server (yes, we HAVE to migrate it, part of the class), which will then be used to be developed into a school-wide fantasy football league (or 3 or 4). This will be developed partially by me, and partially by the rest of the extra-cirricular development crew at our school.


Honestly, I'm doing all this to be able to add "project resolution and management" or some shit like that to my resume. (this is an entirely non-credited assignment. But it needs to get done)
__________________
WTB - INTARWEBS
Big W Powah! is offline   Reply With Quote

 
Uberguilds Network