GithubHelp home page GithubHelp logo

dawitnida / flixpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shelfworthy/flixpy

0.0 1.0 0.0 309 KB

A python API wrapper specificly designed to work with netflix's streaming API

Python 100.00%

flixpy's Introduction

About

This code is desgined to make working with netflix's streaming API easy. We take the pure json output of the netflix API and wrap it in a format that is easy to consume in python.

This code started out as a branch of [pyflix] (http://code.google.com/p/pyflix/)

This is a work in progress.

install

pip install flixpy

setup

First you'll need to get a key and secret from netflix. you can do that by registering here: http://developer.netflix.com/member/register

Once you have those (and have registered an app with them) you can get started. At the most basic level you can access general netflix resources using just the data provided above:

    from flixpy import NetflixClient

    APP_NAME   = '<your app name>'
    API_KEY    = '<your key>'
    API_SECRET = '<your secret>'

    netflix = NetflixClient(APP_NAME, API_KEY, API_SECRET)

You can then do anything that dosn't require a netflix user. An example is autocomplete:

results = netflix.catalog.autocomplete('batman')

print results

[u'Batman: The Animated Series',
 u'Batman Beyond',
 u'Batman: The Brave and The Bold',
 ...

Note that autocomplete only returns title strings. You can then use these in search to get exact matches with more data.

Or do an actual search:

results = netflix.catalog.search('invader zim')

print [i.title for i in results]

[u'Invader Zim',
 u'Invader',
 u'The Invader',
 u'Invisible Invaders',
 ...

The catalog search returns NetflixTitle objects instead of strings. This way you can use them to get more information:

zim = netflix.catalog.search('invader zim')[0]
zim.synopsis

u'Zim, a pint-sized alien with an attitude, decides to single-handedly conquer the human race. Standing in his way is a paranoid kid named Dib. Since neither of them is exactly competent, their confrontations tend to result in disaster.'

zim.available

True  # this title is availble for streaming

zim.watch_link

'https://movies.netflix.com/WiPlayer?movieid=70202354'

More Coming Soon!

flixpy's People

Contributors

chrisdrackett avatar dmishe 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.