Git Product home page Git Product logo

cherry-pick's Introduction

cherry-pick

Scrapes IMDB ratings for an entire run of a television series and plots them with gRaphaël

This tool allows the best episodes to be skimmed from lightly-serialized shows while maintaining the overarching continuity.

A Python script runs with a title query and gathers episode information into a JSON structure that is consumed by the graph. The data can be served as static files or dynamically with a database - tweak the endpoints to your needs.

Note: this is a web scaper and is subject to break at any point due to document restructuring on IMDB's part.

A connector for RethinkDB is provided to load results into a database.

Install

The script is made for Python 3 and uses the Requests and Beautiful Soup packages, as saved in the requirements file:

pip install -r requirements.txt

Install the rethinkdb package to use the database connector.

Usage

python cherrypick.py [-h] [--seasons SEASONS] [-o OUTFILE] query

The query should be precise enough to ensure that the target show is the first result in a title query on IMDB. The seasons parameter can be a comma-delimited list or a hyphen-delimited range or a combination of both.

python cherrypick.py "red dwarf" --seasons 1,3,5-7 -o red_dwarf.json

To use the database connector, provide the connection string in the format host:port/db.

python cherrypick.py "the it crowd" --db localhost:28015/cherry

You can also pipe the JSON through stdout with the --pipe option. Program messages are sent over stderr.

cherry-pick's People

Contributors

jody-zeitler avatar

Watchers

 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.