EZTV

Build Status Gem Version

A Ruby scraper for the catastrophic EZTV API. It is not using the RSS feed since it doesn't work well, so it scrapes the search results.

Installation

Add this line to your application's Gemfile:

gem 'eztv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install eztv

Usage

Fetch a series and get all the magnet links:

require 'eztv'

white_collar = EZTV::Series.new("white collar")

white_collar.episodes.each do |episode|
  puts episode.magnet_link
end

Get all regular torrent download links from S01E01:

white_collar.episode(1,1).links
# ["//torrent.zoink.it/White.Collar.S01E01.Pilot.HDTV.XviD-FQM.[eztv].torrent",
# "http://www.mininova.org/tor/3077342",
# "http://www.bt-chat.com/download.php?info_hash=e0e74306adca549be19b147b5ee14bde1b99bb1d"]

Get number of seasons or number of episodes per season:

puts "Number of seasons: #{white_collar.seasons.count}"
puts "Number of episodes in season 1: #{white_collar.season(1).count}"

Get the last episode of the latest season in SxxExx format:

white_collar.episodes.last.s01e01_format

There will be an error raised if you browsed for a non existing series:

nonny = EZTV::Series.new("nonny")
begin
  nonny.episodes
rescue EZTV::SeriesNotFoundError => e
  puts e.message 
  # "Unable to find 'nonny' on https://eztv.it."
end

Contributing

  1. Fork it ( http://github.com//eztv/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request