GithubHelp home page GithubHelp logo

ericduminil / imdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kcrayon/imdb

1.0 2.0 0.0 7.01 MB

Easy automated access to IMDB

Home Page: http://rubydoc.info/github/ariejan/imdb

License: MIT License

Ruby 100.00%

imdb's Introduction

imdb Build Status Gem Version Code Climate Dependency Status

Description

The IMDB gem allows you to easy access publicly available data from IMDB.

Features

IMDB currently features the following:

  • Search for movies and TV series
  • Retrieve the Top 250 listing
  • Retrieve complete movie information
  • Retrieve TV series and episode information

Read the documentation to see all you can do with this gem.

Examples

Movies:

i = Imdb::Movie.new("0095016")

i.title
#=> "Die Hard"

i.cast_members.first
#=> "Bruce Willis"

Series:

serie = Imdb::Serie.new("1520211")

serie.title
#=> "\"The Walking Dead\""

serie.rating
#=> 8.8

serie.seasons.size
#=> 3

serie.season(1).episodes.size
#=> 6

series.season(1).episode(2).title
#=> "Guts"

Searching:

i = Imdb::Search.new("Star Trek")

i.movies.size
#=> 97

Installation

gem install imdb

Or, if you're using this in a project with Bundler:

gem 'imdb', '~> 0.8'

Running Tests

As this gem uses content from imdb.com, the test suite uses a set of pre-defined fixute files in spec/fixtures. These fixtures are copies of imdb page used in tests.

Run bundle install to install all dependencies, including webmock, which will serve the fixture files instead of doing actual requests to imdb.com.

$ bundle install

Next, simple run rake to run the entire test suite.

Running against actual IMDB data

It's possible to run the test suite directly against imdb.com. This has two disadvantages:

  1. Tests will be slow

  2. Running tests often will probably get you into trouble, see Disclaimer.

    $ LIVE_TEST=true rake

If you want to run against actual imdb data, it's better to just update the fixture files once with up-to-date content:

$ rake fixtures:refresh

When you run the test suite now, it will use the updated fixture files.

Disclaimer

Neither I, nor any developer who contributed to this project, accept any kind of liability for your use of this library.

IMDB does not permit use of its data by third parties without their consent.

Using this library for anything other than limited personal use may result in an IP ban to the IMDB website.

This gem is not endorsed or affiliated with IMDB, or IMDb.com, Inc.

Contributors

This gem is created and maintained by Ariejan de Vroom, with help from lots of awesome contributors

License

See MIT-LICENSE

imdb's People

Contributors

ariejan avatar ericduminil avatar kcrayon avatar mguterl avatar rbu avatar asad-ali-bhatti avatar tolosa avatar brandonmathis avatar kalos avatar guillaumebouteille avatar pcboy avatar thedom avatar tarebyte avatar paulrbr avatar sqrel avatar dbackeus avatar eflorit avatar airhorns avatar kenpratt avatar markgx avatar ghedamat avatar neilnorthrop avatar pgeraghty avatar rick avatar onland avatar heel avatar zhu1230 avatar oopoa avatar

Stargazers

 avatar

Watchers

 avatar James Cloos 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.