Skip to content

Instantly share code, notes, and snippets.

@ejmurray
Created March 7, 2015 09:21
Show Gist options
  • Save ejmurray/616365764c3c189fa88f to your computer and use it in GitHub Desktop.
Save ejmurray/616365764c3c189fa88f to your computer and use it in GitHub Desktop.
Scrape data from http://www.bcsfootball.org.
#!/usr/bin/python
# encoding: utf-8
"""
Description
"""
import urllib2
from bs4 import BeautifulSoup
soup = BeautifulSoup(urllib2.urlopen('http://www.bcsfootball.org').read())
for row in soup('table', {'class': 'mod-data'})[0].tbody('tr'):
tds = row('td')
print tds[0].string, tds[1].string, tds[2].string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment