parsing - Java program to read information from a website -


i writing program in java track "fantasy college basketball" league friends. struggling finding best implementation automatically update statistics each player drafted.

as background, every day individuals in fantasy league earn points based on statistics college basketball players drafted earned week. right now, mannually:

1: go player's espn profile

espn tracks individual player stats url based on random , unique player id number. frank kaminsky's id 56759, espn profile is: http://espn.go.com/mens-college-basketball/player/_/id/56769/. can assume user input player's espn id when player drafted , have information when updating stats.

2: parse html page relevant stats

looking @ url above - important information in "2014 - 2015 game log" section. want obtain recent game's pts, reb, ast, blk, stl, pf, , to use elsewhere in program.

what best approach this?

my first reaction use .openstream() on url, require lot of careful string parsing. html isn't pretty line line...

i have heard of jsoup, haven't used ever before. if people here think best way proceed, i'd happy learn how use it.

use jsoup, easy learn , made job.

the jsoup website has nice tutorial on it.

have here: http://jsoup.org/cookbook/input/load-document-from-url

then parse document methods explained here: http://jsoup.org/cookbook/extracting-data/selector-syntax


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -