Class: Dumper::Profiles::RedBlow

Inherits:
Profile
  • Object
show all
Defined in:
lib/dumper/profiles/redblow.rb

Instance Method Summary collapse

Instance Method Details

#dump(url, path, from, to) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/dumper/profiles/redblow.rb', line 24

def dump(url, path, from, to)
from -= 1
to   -= 1 if to >= 1

Nokogiri::HTML(open(url)).xpath('//img[@class="attachment-medium"]/@src')[from..to].each { |p|
  @pool.process {
    Dumper.get path, p, { referer: url }
  }
}
end