module Instagrammer::Utils

Public Instance Methods

get_page_status() click to toggle source
# File lib/instagrammer/utils.rb, line 4
def get_page_status
  if page.has_content?("Private")
    :private
  elsif page.has_content?("Sorry")
    :not_found
  elsif page.find(:json_ld, visible: false)
    :public
  end
rescue Capybara::ElementNotFound
  :invalid
end