GithubHelp home page GithubHelp logo

nicar2019-scraping's Introduction

NICAR 2019: Scraping with Python

Useful links for NICAR participants

What is this?

This project contains the activities and supporting code for a hands-on workshop on web scraping with Python for the 2019 NICAR conference.

What's in here?

  • Pipfile: Defines Python dependencies for this project. See Pipenv documentation.
  • data: Place to store your the output of your scrapers.
  • data/src: Place to store your raw HTML.
  • reference_cheatsheet.md: Quick technical reference.
  • scrapers: Directory that contains the files you'll edit in these exercises.
  • scrapers-solutions: Directory that contains versions of the scripts in scrapers with the blank sections filled in.
  • scraping_site: Flask app that implements our mock scraping site.

Assumptions

Installation

Clone this repository

git clone https://github.com/asuozzo/nicar2019-scraping.git

Change directory to the project directory

cd nicar2019-scraping

Install Python dependencies

Pipenv

Create a virtualenv for the project and install Python dependencies using Pipenv:

pipenv install

Virtualenvwrapper

Create a virtualenv for the project and install Python dependencies using Virtualenvwrapper:

mkvirtualenv nicar2019-scraping
workon nicar2019-scraping
pip install -r requirements.txt 

Running the mock scraping site

In order to make this workshop able to run, even if conference Internet access is sketchy, we decided to implement a mock site that has many features of actual sites we've scraped as a Flask app. To run this app, run the following command:

pipenv shell
FLASK_ENV=development FLASK_APP=scraping_site flask run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.