Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (15 sloc) 649 Bytes
# Simple script to aggregate students ranks from different websites
import urllib2
import csv
from BeautifulSoup import BeautifulSoup
initials=["A", "B", "C", "D", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "R", "S", "T", "U", "V", "Y"]
urls = ["" % (i.lower()) for i in initials]
resWriter = csv.writer(open('results.csv','w'),lineterminator="\n")
for url in urls:
data = urllib2.urlopen(url).read()
soup = BeautifulSoup(data)
for row in rows:
if rr:
resWriter.writerow([q.string for q in rr])