Skip to content

Instantly share code, notes, and snippets.

View lowellbander's full-sized avatar

Lowell Bander lowellbander

View GitHub Profile
@shazeline
shazeline / scraper_clean.py
Created November 27, 2013 04:23
A cleaned up version of the scraper. The code is nicer.
import re
import requests
from bs4 import BeautifulSoup
BASE = 'http://www.registrar.ucla.edu/schedule/'
def get_dept_url(term, dept):
return BASE + 'crsredir.aspx?termsel=%s&subareasel=%s' % (term, dept)
def get_course_url(term, dept, id):