Sha256: ecdd64fe0cd9f8c83c6128bcb6e7de52b1717d4230fa074cfb55dbd9baea17eb
Contents?: true
Size: 835 Bytes
Versions: 2
Compression:
Stored size: 835 Bytes
Contents
# encoding: utf-8 module Nokaya class ImageshackUser < Basic def initialize args, options = {} super(args, options) @type = :imageshack parsed = parse(args[0]) @urls = album(parsed).compact @author = author() @path = "#{@path}/imageshack-#{@author}-#{@workers.timed}" @filenames = name_files() end private def author @args[0].split('/').last.chomp('/') end def album page return [] if page.nil? refs = page.css('a.hero-wrapper') temp = refs.map {|li| "https://imageshack.com#{li['href']}"} puts Status.toresolve(temp.length) if options['verbose'] temp.map do |p| puts Status.resolving(p) if options['verbose'] ref = parse(p).css('figure.image img') "http:#{ref[0]['src']}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.1.4 | lib/nokaya/imageshack_user.rb |
nokaya-0.1.3 | lib/nokaya/imageshack_user.rb |