Skip to content

Instantly share code, notes, and snippets.

View wmoore's full-sized avatar

Walter Moore wmoore

View GitHub Profile
require 'open-uri'
require 'net/http'
require 'openssl'
default_params = {"api" => "v1", "appid" => "iphone1_1", "apiPolicy" => "app1_1", "apiKey" => "2wex6aeu6a8q9e49k7sfvufd6rhh0n", "locale" => "en_US", "timestamp" => Time.now.to_i, "q" => "Tomorrow Never Dies"}
param_array = []
default_params.each_pair{|key, value| param_array << "#{key}=#{URI.escape(value.to_s)}" }
uri = URI::HTTP.build(:scheme => 'https', :host => "app.imdb.com", :path => "/find", :query => param_array.join("&"))