Sha256: 802ee10334cfce936d93d2fc3c60d99407de4d83a48b3872ce2316a6bd80e0a8

Contents?: true

Size: 616 Bytes

Versions: 10

Compression:

Stored size: 616 Bytes

Contents

module DownloadTV
	class Eztv < LinkGrabber
		def initialize
			super("https://eztv.ag/search/%s")
		end

		def get_links(s)

			# Format the url
			search = @url % [s]

			data = @agent.get(search).search("a.magnet")

			# Torrent name in data[i].attribute "title"
			# "Suits S04E01 HDTV x264-LOL Torrent: Magnet Link"

			# EZTV shows 50 latest releases if it can't find the torrent
			raise NoTorrentsError if data.size == 50

			names = data.collect { |i| i.attribute("title").text.chomp(" Magnet Link") }
			links = data.collect { |i| i.attribute("href").text }

			names.zip(links)
			
		end
		
		
	end
	
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
download_tv-2.2.1 lib/download_tv/grabbers/eztv.rb
download_tv-2.2.0 lib/download_tv/grabbers/eztv.rb
download_tv-2.1.1 lib/download_tv/grabbers/eztv.rb
download_tv-2.1.0 lib/download_tv/grabbers/eztv.rb
download_tv-2.0.6 lib/download_tv/grabbers/eztv.rb
download_tv-2.0.5 lib/download_tv/grabbers/eztv.rb
download_tv-2.0.4 lib/download_tv/grabbers/eztv.rb
download_tv-2.0.3 lib/download_tv/grabbers/eztv.rb
download_tv-2.0.0 lib/download_tv/grabbers/eztv.rb
download_tv-1.0.0 lib/download_tv/grabbers/eztv.rb