Skip to content

DamirSvrtan/eztv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EZTV

Build Status Gem Version Dependencies Status Code Climate

A Ruby scraper as a substitution 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}"
# Number of seasons: 5
puts "Number of episodes in season 1: #{white_collar.season(1).count}"
# Number of episodes in season 1: 13

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

white_collar.episodes.last.s01e01_format
# S05E13

Fetch an episode in S01E01 format:

white_collar.get('S03E05')
# EZTV::Episode.new

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.
  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

About

Ruby EZTV scraper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages