Materials for MIT Political Methodology Lab workshop on learning to scrape with Python.
- Download the Anaconda distribution of Python 3 from the Anaconda site and follow the installation instructions for your system. (Make sure you install Python 3). We'll use this distribution of Python because it comes with many of the standard scientific computing packages pre-installed.
- Launch Jupyter Notebook. You can do this in two ways:
- Open the newly installed "Anaconda Navigator" and launch Jupyter Notebook from there
- Open your command line and run
jupyter notebook
- Once Jupyter is running, you'll be able to access Jupyter by opening your browser and going to http://localhost:8888/.
- Download this repository from Github and save it in a convenient location on your computer.
- Finally, from within Jupyter, browse to the location where you saved this repository in Step 4 and make sure you can open an
.ipynb
notebook.
Scraper_Skeleton.ipynb
contains a skeleton of a web scraper and is what we'll
be working through during the workshop.
Scraper_Completed.ipynb
contains the "solutions" for Scraper_Skeleton
.