Sha256: db565ff28aaff1a42d282dae77abcb91b6b16a2bd00c119754d25bbd1ab8484b
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
# encoding: utf-8 module Nokaya class Instagram < Basic attr_reader :author def initialize args, options = {} super(args, options) @type = :instagram parsed = parse(args[0]) @urls = [get_basic(parsed)].compact @author = author_name(parsed) @filenames = name_files() end private def author_name page return [] if page.nil? page.xpath("//meta[@property='instapp:owner_user_id']/@content")[0].value end def name_files unless @urls.empty? @name ||= @workers.sanitize(@author) ["#{@type.to_s}-#{@workers.sanitize(@author)}-#{@workers.timed}.jpg"] else [] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nokaya-0.1.6 | lib/nokaya/instagram.rb |
nokaya-0.1.5 | lib/nokaya/instagram.rb |