Skip to main content

Simple script to scrape polling data from RealClearPolitics and output as .csv

Project description

Simple script to scrape polling data from RealClearPolitics and output as .csv.

Install

pip install realclearpolitics

Usage

usage: rcp [-h] [--output [OUTPUT]] url [url ...]

positional arguments:
  url                The url of the polling data.

optional arguments:
  -h, --help         show this help message and exit
  --output [OUTPUT]  The output file name.

Examples

Get the US general election results.

rcp http://www.realclearpolitics.com/epolls/2016/president/us/general_election_trump_vs_clinton-5491.html --output general.csv

Download multiple polls.

rcp http://www.realclearpolitics.com/epolls/2016/president/us/general_election_trump_vs_clinton-5491.html \
> https://www.realclearpolitics.com/epolls/other/president_trump_job_approval_economy-6182.html \
> https://www.realclearpolitics.com/epolls/other/president_trump_job_approval_foreign_policy-6183.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for realclearpolitics, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size realclearpolitics-1.0.0-py2.py3-none-any.whl (2.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size realclearpolitics-1.0.0.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page