class DownloadTV::Eztv
EZTV.ag grabber
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/download_tv/grabbers/eztv.rb, line 7 def initialize super('https://eztv.ag/search/%s') end
Public Instance Methods
get_links(show)
click to toggle source
# File lib/download_tv/grabbers/eztv.rb, line 11 def get_links(show) raw_data = @agent.get(format(@url, show)) raw_seeders = raw_data.search('td.forum_thread_post_end').map { |e| e.children[0].text.to_i } raw_links = raw_data.search('a.magnet').sort_by.with_index { |_, index| raw_seeders[index] }.reverse # EZTV shows 50 latest releases if it can't find the torrent raise NoTorrentsError if raw_links.size == 50 raw_links.collect do |i| [i.attribute('title').text.chomp(' Magnet Link'), i.attribute('href').text] end end