Code Monkey home page Code Monkey logo

legistar-scrape's Introduction

OpenGovernment.org Legistar Importer

Uses Legistar Scraper - a python library for scraping Legistar sites -- legislation management sites hosted by by Granicus.

Installation

git clone git://github.com/opengovernment/opengovernment-legistar-scrape.git
cd opengovernment-legistar-scrape
pip install -r requirements.txt

Copy over the settings file and update with your parameters

cp settings.py.example settings.py

Usage

Save Council Agendas and Council Members to opengovernment_import mongo collection

python import.py

legistar-scrape's People

Contributors

derekeder avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

legistar-scrape's Issues

pa-philadelphia María Quiñones-Sánchez page contains unicode chars

Similar to opengovernment/opengovernment-local#9

Error is generated when scraping:

saving Councilmember O'Brien 522f2ce812a96023f0e70e95
saving Councilmember Oh 522f2ce812a96023f0e70e96
saving Councilmember O'Neill 522f2ce812a96023f0e70e97
saving Traceback (most recent call last):
  File "./import.py", line 89, in <module>
    print 'saving', member['Person Name'], council_member_id
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 17: ordinal not in range(128)

Could not install pdfminer requirement on CentOS 6.4

Downloading/unpacking pdfminer (from -r /u/apps/legistar-scrape-staging/requirements.txt (line 12))
Could not find a version that satisfies the requirement pdfminer (from -r /u/apps/legistar-scrape-staging/requirements.txt (line 12)) (from versions: 20100829, 20101226, 20091219, 20100213, 20100327, 20100424, 20100322, 20101017, 20100104, 20110227, 20091129, 20091024, 20100131, 20100619p1, 20110515, dist-20080727, dist-20090201, dist-20080629, dist-20080429, dist-20080906, dist-20090110, dist-20090517, dist-20090117)
Cleaning up...
No distributions matching the version for pdfminer (from -r /u/apps/legistar-scrape-staging/requirements.txt (line 12))

Parameterize scraping

The current scraper hardcodes pa-philadelphia; this scraper should be parameterized so we can scrape different local governments by providing alternate command line arguments.

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.