mwhich

Generic API to search for movies or TV shows across Netflix, Hulu, iTunes, and Amazon Video on Demand

  • 所有者: dacort/mwhich
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

= NOTE: THIS CODE IS NO LONGER MAINTAINED
Netflix shut down their public API. :(
Please take a look at http://www.canistream.it and {this Ruby gem for canistream.it API}[https://github.com/KevinBongart/canistreamit].

= MWhich

Because searching Netflix, Amazon, Hulu, and iTunes sucks rocks!

== INSTALLATION

If you've downloaded this code from the repository or as an archive, just run

rake install

== DESCRIPTION

MWhich was created because I'm lazy, and that laziness led to a loss of money.
Many times I end up watching on movie on iTunes simply because it is the first
place I look, even though had I taken another minute I would have found the
same movie available via Netflix Instant Play, or cheaper on Amazon's Video on
Demand service.

== API ACCESS

Of course there is no easy standard for accessing this movie data, Tim
Berners-Lee's wishes be damned. Here is how these services are accessed:

  • Netflix: OData via odata.netflix.com[http://odata.netflix.com]
  • Amazon: ECS
  • Hulu: Some hack of their publisher tool endpoint
  • iTunes: Their Store Web Service Search API via AffiliatesSearch2.1.pdf[http://www.apple.com/itunesaffiliates/API/AffiliatesSearch2.1.pdf]

== REQUIREMENTS

You'll need the following gems:

  • yajl-ruby
  • nokogiri
  • ruby-hmac

== USAGE

This is very bare bones right now:

To create a basic MWhich instance:

m = MWhich::Client.new

Search for a movie:

m.search("The Prestige")
# => {:amazon=>[], :hulu=>[], :itunes=>["feature-movie: The Prestige ($9.99)"], :netflix=>["Movie: The Prestige"]}

At this time, this merely returns a hash of key/value pairs indicating which
services the movie or TV show was found on. The value is a simple string with
the type of media found and the title. Comments specific to each service
may also appear. For example:

  • If available on Netflix Instant Play, "Watch now!" will show up.
  • Hulu sometimes links to external content, "Not on hulu!" will identify this.
  • iTunes prices will be displayed

An array of services can be passed to the MWhich instance to limit the search.

Only want to search Netflix and Hulu?

m = MWhich::Client.new(:services => [:netflix, :hulu])
m.search("Knight Rider")
# => {:hulu=>["episode: I Love the Knight Life", "episode: Knight and the City", "episode: Fly By Knight", "episode: Fight Knight", "episode: Exit Light, Enter Knight", "episode: Knight to King's Pawn", "episode: Day Turns Into Knight", "episode: Don't Stop the Knight", "episode: Knight Fever", "episode: Knight of the Zodiac"], :netflix=>["Series: Knight Rider", "Series: Knight Rider"]}

This is obviously imperfect, but does provide an initial abstracted search.

主要指标

概览
名称与所有者dacort/mwhich
主编程语言Ruby
编程语言Ruby (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2010-11-29 07:19:53
推送于2018-09-19 20:40:51
最后一次提交2015-03-03 17:08:34
发布数0
用户参与
星数74
关注者数7
派生数12
提交数36
已启用问题?
问题数2
打开的问题数0
拉请求数2
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?