Sha256: d00a76f0fb24d42c8ea253e2869d56e71506465b06c70f208224d28130672235

Contents?: true

Size: 548 Bytes

Versions: 8

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

module DownloadTV
  ##
  # TorrentGalaxy grabber
  class TorrentGalaxy < LinkGrabber
    def initialize
      super('https://torrentgalaxy.to/torrents.php?search=%s&sort=seeders&order=desc')
    end

    def get_links(show)
      raw_data = agent.get(format(@url, show))
      rows = raw_data.search('div.tgxtablerow')

      raise NoTorrentsError if rows.size == 0

      rows.map do |row|
        [row.children[4].text.strip,
         row.children[5].children[1].attribute('href').text]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
download_tv-2.9.1 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.9.0 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.5 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.4 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.3 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.2 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.1 lib/download_tv/grabbers/torrentgalaxy.rb
download_tv-2.8.0 lib/download_tv/grabbers/torrentgalaxy.rb