Sha256: 68939937cc6b3b2ec6f28f4585f8d8f1debd9d0634939c6d57660d4dc72747e0

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

module InstaScraper
  class HTML::Media < InstaScraper::HTML
    attr_reader :code,
                :params

    def initialize(code = nil, html = nil, params = {})
      raise ArgumentError, 'Provide a code or html string' if !code && !html

      @code = code
      @html = html
      @params = params
    end

    def url
      "https://www.instagram.com/p/#{code}/#{serialize_params}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
insta_scraper-0.8.0 lib/insta_scraper/html/media.rb
insta_scraper-0.7.0 lib/insta_scraper/html/media.rb
insta_scraper-0.6.1 lib/insta_scraper/html/media.rb
insta_scraper-0.6.0 lib/insta_scraper/html/media.rb