Git Product home page Git Product logo

carscrape's Introduction

Edmunds.com api access script

Requirements

NodeJS and a shell environment with bash is required to run this script.

Mac users, terminal uses Bash, so you are good to go.

Windows users, as windows does not come with a Bash shell, try installing cygwin or use git bash

Developer note:

The javascript in this project is written using modern ES6/7 Syntax and therefore must be run/compiled with BabelJS. No further effort is necessary though, as babel is included as an npm dependency, and the script utilizes babel-node to run the javascript.

Installation

  1. install NodeJS

  2. Clone this repository by running (or download the zip file)... git clone https://github.com/bsouthga/carscrape.git

  3. Navigate to the project folder (carscrape) in your bash shell

  4. Run npm install to install the dependencies.

Usage

To scrape a list of cars and locations, run the following command...

./scrape -v vehicles.csv -l locations.csv -c credentials.json

Where credentials.json are your api credentials to the Edmunds api, of the format...

{
  "client_id": "ENTER YOUR SECRET ID",
  "client_secret": "ENTER YOUR SECRET KEY"
}

This will produce an output csv file with a name something like results_1444696434.csv (the number is the current unix timestamp).

For help with usage, run...

./scrape -h

you should see...

Usage for ./scrape...

Edmunds.com api scraping script...

EXAMPLE

  ./scrape -v vehicles.csv -l locations.csv -c credentials.json -o out.csv

OPTIONS

  -v : csv file of vehicles to scrape, must contain 'Make' and 'Model' columns
        additionally, vehicle make and model must appear on lookup on edmunds.com

  -l : csv file of locations to scrape, must contain 'ZIP'

  -c : json file of credentials for api access, should be of the form...
        {
          \"client_id\": \"ENTER YOUR SECRET ID\",
          \"client_secret\": \"ENTER YOUR SECRET KEY\"
        }

  -o : (optional) filename of output csv, if omitted, data will be output
       to file named 'results_(unix timestamp).csv'

  -h : show this message

carscrape's People

Contributors

bsouthga avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.