Skip to content
Imdb library to get movie meta from, since they're too cool to give us an API
Pull request Compare This branch is 2 commits ahead, 44 commits behind maddox:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A simple ruby library to scrape IMDB


This project was forked at the RubyJax May 2009 "Pair Programming" meeting as
an experiment to see if we could add search.
Thanks to my pair Imre Mehesz, you can now search for a movie.


>> require 'lib/imdb'
>> movies = Imdb.find_movie_by_name("The Godfather")
=> [#<Imdb::SearchResult:0x53ceb0 @id="tt0068646", @name="The Godfather (1972) aka \"Mario Puzo&#x27;s The Godfather\" - USA (complete title)", @url="">, #<Imdb::SearchResult:0x51adb0 @id="tt0071562", @name="The Godfather: Part II (1974) aka \"Mario Puzo&#x27;s The Godfather: Part II\" - USA (complete title)aka \"The Second Godfather\" - USA (working title)", @url="">, #<Imdb::SearchResult:0x507e68 @id="tt0099674", @name="The Godfather: Part III (1990) aka \"Mario Puzo&#x27;s The Godfather: Part III\" - USA (complete title)", @url="">]
=> "The Godfather: Part III (1990) aka "Mario Puzo&#x27;s The Godfather: Part III" - USA (complete title)"
>> movies.last.url
=> ""
=> "tt0099674"

>> Imdb.find_movie_by_id(
=> #<ImdbMovie:0x11e45b4 @rating="7.6", @tagline="All the power on earth can&#x27;t change destiny.", @writers=[#<ImdbName:0x68f88 @name="Mario Puzo", @imdb_id="nm0701374", @role="written by">, #<ImdbName:0x68dd0 @name="Francis Ford Coppola", @imdb_id="nm0000338", @role="written by">], runtime"162 min  | USA:169 min (video version)", title"The Godfather: Part III", release_date#<Date: 4896501/2,0,2299161, @imdb_id="tt0099674", @plot="In the midst of trying to legitimize his business dealings in 1979 New York and Italy, aging mafia don Michael Corleone seeks to vow for his sins while taking a young prot\351g\351 under his wing.", @genres=[#<ImdbGenre:0x425b8 @name="Action", @imdb_id="Action">, #<ImdbGenre:0x4176c @name="Crime", @imdb_id="Crime">, #<ImdbGenre:0x41370 @name="Drama", @imdb_id="Drama">, #<ImdbGenre:0x4095c @name="Thriller", @imdb_id="Thriller">], poster_url"", company#<ImdbCompany:0x119c55c @name="Paramount Pictures", @imdb_id="co0023400">, directors[#<ImdbName:0x6fff4 @name="Francis Ford Coppola", @imdb_id="nm0000338", @role=nil>]


require 'Imdb'

movie = Imdb.find_movie_by_id('tt1099212')

puts "IMDB ID: #{movie.imdb_id}"
puts "Title: #{movie.title}"
puts "Rating: #{movie.rating}"
puts "Release Date: #{movie.release_date}"
puts "Tagline: #{movie.tagline}"
puts "Plot: #{movie.plot}"
puts "Runtime: #{movie.runtime}"
movie.directors.each do |director|
        puts "Director: #{}"
movie.writers.each do |writer|
        puts "Writer: #{}"
movie.genres.each do |genre|
        puts "Genre: #{}"
puts "Poster URL: #{movie.poster_url}"

Thats about all it does. its simple. I only made it to work with another project.
Thanks to 'We <} Code' for the jump start via
Something went wrong with that request. Please try again.