Sha256: f61483028948b7c648975ed7fc5761a2df48d80d62ae7073b326d7c852eef364
Contents?: true
Size: 627 Bytes
Versions: 1
Compression:
Stored size: 627 Bytes
Contents
# encoding: utf-8 module Nokaya class Photonet < Basic def initialize args, options = {} super(args, options) @type = :photonet parsed = self.parse(args[0]) @image_url = album(parsed) @path = "#{@path}/photonet-#{@workers.timed}" @file_name = name() end private def album page refs = page.css('.trp-top a') refs.map do |lin| "http://gallery.photo.net/photo/#{lin['href'].split("=").last}-lg.jpg" end end def name @image_url.map do |url| "#{@type.to_s}-#{File.basename(url).gsub('-lg', '')}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.1.2 | lib/nokaya/photonet.rb |