eggplantbren/CricketHazard — pull request #1 by berianjames (2012-04-09 23:49:11+00:00)
Title: Fetch method in Career class to pull batting record from web

I have added a method ``fetch`` in the Career class that will pull and parse a player's batting list from the web. An example use of this is given in an updated main.py:

# Pull data from web
data = Career()
data.fetch() # By default, fetches Watto's ODI record.

The method works by specifying fetch(playerID), which defaults to 8180 (SR Watson). I have also added (but not written) a function in Data.py that will provide a list of possible player IDs for a search by name, by doing a web query.

Pulling data from the web requires urllib2 and beautifulsoup4 (n.b. this is not the same API as BeautifulSoup), so you will need to ``pip install beautifulsoup4`` or ``easy_install beautifulsoup4``.