Sha256: 5b79318633c1d413a6a9fa0327355dd582a0b1c1821fbf99984e7d84bb39b9af
Contents?: true
Size: 569 Bytes
Versions: 13
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true module DownloadTV ## # Torrentz2 grabber class Torrentz < LinkGrabber def initialize super('https://torrentz2.nz/search?q=%s') end def get_links(show) raw_data = agent.get(format(@url, show)) results = raw_data.search('dl') raise NoTorrentsError if results.empty? data = results.sort_by { |e| e.search('dd span')[3].text.to_i }.reverse data.collect do |i| [i.children[0].text.strip, i.search('dd span a').first.attribute('href').text] end end end end
Version data entries
13 entries across 13 versions & 1 rubygems