class DownloadTV::Torrentz
EZTV.ag grabber
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/download_tv/grabbers/torrentz2.rb, line 7 def initialize super('https://torrentzeu.org/kick.php?q=%s') end
Public Instance Methods
get_links(show)
click to toggle source
# File lib/download_tv/grabbers/torrentz2.rb, line 11 def get_links(show) raw_data = @agent.get(format(@url, show)) results = raw_data.search('tbody tr') # require 'byebug'; byebug raise NoTorrentsError if results.empty? data = results.sort_by { |e| e.search('td[data-title="Last Updated"]')[1].text.to_i }.reverse data.collect do |i| [i.children[1].text.strip, i.children[11].children[1].attribute('href').text] end end