Skip to content

kogsio/coursecatalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course Catalog

Scrape the MIT course catalog with using python.

Quickstart

You can start by running quickstart.py and downloading a single catalog page.

import urllib.request

# first page of MIT course catalog
url = 'http://student.mit.edu/catalog/m1a.html'

# Download the file from `url` and save it locally under `file_name`:
urllib.request.urlretrieve(url, 'm1a.html')

All Catalog Pages

You can down all the pages of the catalog with file named courseCatalog.py.

Merge pages

Marge the catalog pages with merge.py.

Sensemaking

Before running sensemaking.py, you need to download all the catalog pages and merge them into one file. You can do that by running courseCatalog.py first and then merge.py.

Note: the merged file has over 45,000 lines of html. Parsing will be slow.

About

Scrape MIT course catalog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published