GithubHelp home page GithubHelp logo

xstaticxgpx / netflix_roulette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tizz98/netflix_roulette

0.0 1.0 0.0 73 KB

A simple python wrapper for the Netflix Roulette API

License: GNU General Public License v3.0

Python 100.00%

netflix_roulette's Introduction

Netflix Roulette

This is a simple python wrapper for the Netflix Roulette API.

Build Status PyPI version Python Versions License

Installation

Pip

  • pip install netflix_roulette

From Source

  • git clone [email protected]:tizz98/netflix_roulette.git
  • cd netflix_roulette
  • python setup.py install

Usage

Simple Query

>>> import netflix_roulette
>>> media = netflix_roulette.NetflixMedia('Attack on titan')
>>> media
<NetflixMedia(title='Attack on titan', year='None')>
>>> media.show_id
70299043
>>> media.summary
u'For over a century, people have been living behind barricades to block out the giant Titans that threaten to destroy the human race. When a Titan destroys his hometown, young Eren Yeager becomes determined to fight back.'
>>> media.is_on_netflix
True
>>> media.get_readable_mediatype()
'TV Show'

Query with year

>>> import netflix_roulette
>>> media = netflix_roulette.NetflixMedia('The Boondocks', year=2005)
>>> media
<NetflixMedia(title='The Boondocks', year='2005')>
>>> media.show_id
70153391
>>> media.summary
u'Based on the comic strip by Aaron McGruder, this satirical animated series follows the socially conscious misadventures of Huey Freeman, a preternaturally smart 10-year-old who relocates from inner-city Chicago to the suburbs.'
>>> media.is_on_netflix
True
>>> media.get_readable_mediatype()
'TV Show'

class NetflixMedia

Parameters

  • title: Title of the media you are searching for.
  • year: (Optional) Year of the media you are searching for.

Attributes

  • title: User supplied title of the media you are searching for.
  • year: User supplied year of the media you are searching for.
  • rating: How high the media is rated, max is 5.
  • poster: The poster for the media, right from the Netflix CDN.
  • mediatype: 0 means movie, 1 means TV Show. See also get_readable_mediatype().
  • release_year: The media's release date.
  • show_cast: The cast of a given title.
  • category: A title's given category.
  • summary: A plot summary.
  • director: The name(s) of the director(s) of a given title.
  • show_id: The Netflix id of the title.
  • is_on_netflix: A boolean, whether or not the show is on Netflix.

Methods

  • get_readable_mediatype(): Returns TV Show or Movie instead of 1 or 0.
  • is_movie(): Returns True if the media is a Movie.
  • is_tv_show(): Returns True if the media is a TV Show.

class NetflixDirector

Parameters

  • name: Name of the director you are searching for.

Attributes

  • name: User supplied name.
  • media: List of NetflixMedia that the person has directed.

class NetflixActor

Parameters

  • name: Name of the actor you are searching for.

Attributes

  • name: User supplied name.
  • media: List of NetflixMedia that the person has been in.

netflix_roulette's People

Contributors

tizz98 avatar

Watchers

 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.