Module: IsohuntParser::Parser
- Defined in:
- lib/manager/sites/isohunt_parser.rb
Overview
Parse values from html
Constant Summary collapse
- BASEURL =
'https://isohunt.to'
Class Method Summary collapse
- .leechers(_div) ⇒ Object
- .seeders(div) ⇒ Object
- .size(div) ⇒ Object
- .torrent_name(div) ⇒ Object
- .torrent_url(div) ⇒ Object
Class Method Details
.leechers(_div) ⇒ Object
25 26 27 |
# File 'lib/manager/sites/isohunt_parser.rb', line 25 def self.leechers(_div) 'N/A' end |
.seeders(div) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/manager/sites/isohunt_parser.rb', line 16 def self.seeders(div) links = div.search(".//td[@class=' sy' or @class=' sn']") value = '' links.each do |link| value = link.content end value end |
.size(div) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/manager/sites/isohunt_parser.rb', line 29 def self.size(div) links = div.search(".//td[@class='size-row']") value = '' links.each do |link| value = link.content end value end |
.torrent_name(div) ⇒ Object
43 44 45 46 |
# File 'lib/manager/sites/isohunt_parser.rb', line 43 def self.torrent_name(div) links = div.search('.//a[@href]') links[0].content end |
.torrent_url(div) ⇒ Object
38 39 40 41 |
# File 'lib/manager/sites/isohunt_parser.rb', line 38 def self.torrent_url(div) links = div.search('.//a[@href]') BASEURL + links[0].attributes['href'] end |