Sha256: 63c08dcb04e36bdf75ffd178778b8bcdb422fbbaf449c43c14dc42d1c5756f61

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

# imdb monkeypatch 
module Imdb
    
    class Search
        class << self
            def query(query)
                open("http://www.imdb.#{$language}/find?q=#{CGI::escape(query)};s=tt")
            end
        end
    end

    class Movie
        #TODO improve this 'cause imdb site has changed
        def director
            document.at("h4[text()='Director:'] ~ a").innerHTML.strip.imdb_unescape_html rescue nil
            document.search("h4[text()^='Director'] ~ a").map { |link| link.innerHTML.strip.imdb_unescape_html } rescue []
        end
    end
          
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
movie-renamer-0.0.24 lib/movie-renamer/imdb.rb
movie-renamer-0.0.23 lib/movie-renamer/imdb.rb